Skip to content

Commit

Permalink
Merge branch 'titan09' of https://github.com/thinkaurelius/titan into…
Browse files Browse the repository at this point in the history
… titan09
  • Loading branch information
mbroecheler committed Sep 5, 2015
2 parents 732d08f + dcedc76 commit 7fa81a4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 44 deletions.
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
Expand Down Expand Up @@ -1175,6 +1175,12 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop2.version}</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
Expand Down
6 changes: 6 additions & 0 deletions titan-hadoop-parent/titan-hadoop-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
<version>${hbase098.version}</version>
<optional>true</optional>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,49 +104,6 @@ public float getProgress() {
return reader.getProgress();
}

private static class CassandraMapIterable implements Iterable<Entry> {

private final SortedMap<ByteBuffer, Cell> columnValues;

public CassandraMapIterable(final SortedMap<ByteBuffer, Cell> columnValues) {
Preconditions.checkNotNull(columnValues);
this.columnValues = columnValues;
}

@Override
public Iterator<Entry> iterator() {
return new CassandraMapIterator(columnValues.entrySet().iterator());
}

}

private static class CassandraMapIterator implements Iterator<Entry> {

private final Iterator<Map.Entry<ByteBuffer, Cell>> iterator;

public CassandraMapIterator(final Iterator<Map.Entry<ByteBuffer, Cell>> iterator) {
this.iterator = iterator;
}

@Override
public boolean hasNext() {
return iterator.hasNext();
}

@Override
public Entry next() {
final Map.Entry<ByteBuffer, Cell> entry = iterator.next();
ByteBuffer col = entry.getKey();
ByteBuffer val = entry.getValue().value();
return StaticArrayEntry.of(StaticArrayBuffer.of(col), StaticArrayBuffer.of(val));
}

@Override
public void remove() {
throw new UnsupportedOperationException();
}
}

private static class KV {
private final StaticArrayBuffer key;
private ArrayList<Entry> entries;
Expand Down

0 comments on commit 7fa81a4

Please sign in to comment.