2015-12-04 146 views
2

我使用Mac OS X,我的ant,java依賴項滿足最低要求。當我通過無法從源代碼構建Cassandra

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類。如何解決這個問題?

+0

'javac -version'的輸出是什麼? –

回答

4

它看起來像源代碼來自源3.0以前和後3.0 Cassandra在您的源代碼樹中。我會跑:

git clean -xfd 

要看看是否修復它。否則,請刪除存儲庫並使用乾淨的克隆重新啓動。