首页 文章

用Caetand从Cassandra中读取动态列族

提问于
浏览
1

我必须将数据从一个集群迁移到另一个集群,对数据进行一些转换 . 我正在尝试使用Kettle来完成本教程:

http://wiki.pentaho.com/display/EAI/Cassandra+Input

但我试图从通过cli(在之前版本的Cassandra中)创建的动态列族中读取:

使用read_repair_chance = 0和gc_grace = 0创建列族FamilyMorphsIndividuals;

我像这样创建cassandra输入步骤:

enter image description here

当我点击show schema时会出现以下信息:

列族:IndividualMorphsIndividuals密钥验证器:org.apache.cassandra.db.marshal.BytesType列比较器:org.apache.cassandra.db.marshal.BytesType默认列验证器:org.apache.cassandra.db.marshal.BytesType读取修复机会:0.0 GC宽限期:0最小压缩阈值:4最大压缩阈值:32复制写入:true

Column metadata:

但是当我尝试预览该步骤时,我收到此错误:

2013/11/06 08:17:22 - Cassandra Input.0 - Getting meta data for column family IndividualMorphsIndividuals
2013/11/06 08:17:22 - Cassandra Input.0 - Executing query SELECT * FROM IndividualMorphsIndividuals;  ...
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : Unexpected error
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : org.pentaho.di.core.exception.KettleException: 
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : Cant find a deserializer for type "{0}"
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : 
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) :  at org.pentaho.cassandra.CassandraColumnMetaData.getColumnValue(CassandraColumnMetaData.java:965)
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) :  at org.pentaho.cassandra.CassandraColumnMetaData.getColumnName(CassandraColumnMetaData.java:878)
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) :  at org.pentaho.di.trans.steps.cassandrainput.CassandraInputData.cassandraRowToKettle(CassandraInputData.java:567)
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) :  at org.pentaho.di.trans.steps.cassandrainput.CassandraInput.processRow(CassandraInput.java:271)
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) :  at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50)
2013/11/06 08:17:22 - Cassandra Input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) :  at java.lang.Thread.run(Thread.java:722)
2013/11/06 08:17:22 - Cassandra Input.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)
2013/11/06 08:17:22 - Spoon - The transformation has finished!!
2013/11/06 08:17:22 - Transformation 1 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : Errors detected!
2013/11/06 08:17:23 - Transformation 1 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : Errors detected!

有谁知道如何使用这种带水壶的柱系列进行操作?

谢谢

1 回答

  • 0

    我也遇到了这个问题,但没有找到任何解决方案,所以我更改而不是CLI我使用cql(cassandra查询语言),因为我使用的是pdi 4.4所以我们必须为CQL添加1个插件,然后你就可以轻松连接 Cassandra 到水壶 .

    按照链接通过CQL连接cassandra

    Connecting Cassandra through CQL

相关问题