用Caetand从Cassandra中读取动态列族

时间:2013-11-06 07:36:30

标签: cassandra kettle

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

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

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

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

我创建了这样的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!

有没有人知道如何使用Kettle对这种色谱柱系列进行操作?

由于

1 个答案:

答案 0 :(得分:0)

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

按照链接连接cassandra到CQL

Connecting Cassandra through CQL