无法从源代码构建Cassandra

时间:2015-12-04 04:07:31

标签: java ant cassandra

我正在使用Mac OS X,我的蚂蚁,java依赖满足了最低要求。当我通过

构建源代码时
ant build

我得到的错误如下:

 [echo] apache-cassandra: /Users/taiyuanz/git/cassandra-trunk/build.xml
[javac] Compiling 890 source files to /Users/taiyuanz/git/cassandra-trunk/build/classes/main
[javac] Note: Processing compiler hints annotations
[javac] warning: Supported source version 'RELEASE_6' from annotation processor 'org.openjdk.jmh.generators.BenchmarkProcessor' less than -source '1.8'
[javac] /Users/taiyuanz/git/cassandra-trunk/src/java/org/apache/cassandra/db/partitions/AbstractBTreePartition.java:33: error: reference to Row is ambiguous
[javac] public abstract class AbstractBTreePartition implements Partition, Iterable<Row>
[javac]                                                                             ^
[javac]   both interface org.apache.cassandra.db.rows.Row in org.apache.cassandra.db.rows and class org.apache.cassandra.db.Row in org.apache.cassandra.db match
[javac] /Users/taiyuanz/git/cassandra-trunk/src/java/org/apache/cassandra/db/partitions/PartitionUpdate.java:72: error: reference to Row is ambiguous
[javac]     private BTree.Builder<Row> rowBuilder;
[javac]                           ^
[javac]   both interface org.apache.cassandra.db.rows.Row in org.apache.cassandra.db.rows and class org.apache.cassandra.db.Row in org.apache.cassandra.db match
[javac] /Users/taiyuanz/git/cassandra-trunk/src/java/org/apache/cassandra/db/partitions/PartitionUpdate.java:164: error: reference to Row is ambiguous
[javac]     public static PartitionUpdate singleRowUpdate(CFMetaData metadata, DecoratedKey key, Row row)
.......

所有因为同样的问题 - 由于Row类引起的歧义。怎么能解决这个问题?

1 个答案:

答案 0 :(得分:4)

看起来你的源代码树中有3.0之前版本和3.0之后的Cassandra源代码。我会跑:

invokeMethod(..)

看看是否修复了它。否则,删除存储库并使用干净的克隆重新开始。