You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@s2graph.apache.org by st...@apache.org on 2016/06/13 13:40:23 UTC
incubator-s2graph git commit: [S2GRAPH-64]: incrementCounts yield
type case exception. fix incorrect type casting bug.
Repository: incubator-s2graph
Updated Branches:
refs/heads/master 4012a5597 -> a8539c2b6
[S2GRAPH-64]: incrementCounts yield type case exception.
fix incorrect type casting bug.
JIRA:
[S2GRAPH-64] https://issues.apache.org/jira/browse/S2GRAPH-64
Pull Request:
Closes #58
Authors:
DOYUNG YOON: steamshon@apache.org
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/a8539c2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/a8539c2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/a8539c2b
Branch: refs/heads/master
Commit: a8539c2b6a68e10b881e003cf68ebbf654be6f70
Parents: 4012a55
Author: DO YUNG YOON <st...@apache.org>
Authored: Mon Jun 13 22:39:12 2016 +0900
Committer: DO YUNG YOON <st...@apache.org>
Committed: Mon Jun 13 22:39:12 2016 +0900
----------------------------------------------------------------------
CHANGES | 2 ++
.../s2graph/core/storage/hbase/AsynchbaseStorage.scala | 8 +++++---
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/a8539c2b/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 4eb3ddd..c8cf738 100644
--- a/CHANGES
+++ b/CHANGES
@@ -95,6 +95,8 @@ Release 0.12.1 - unreleased
S2GRAPH-63: Condition on partition strong edges and weak edges on mutateEdges is wrong (Committed by DOYUNG YOON).
+ S2GRAPH-64: incrementCounts yield type case exception (Committed by DOYUNG YOON).
+
TASKS
S2GRAPH-2: Update document and quick start environment to have recent set-up command changes.
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/a8539c2b/s2core/src/main/scala/org/apache/s2graph/core/storage/hbase/AsynchbaseStorage.scala
----------------------------------------------------------------------
diff --git a/s2core/src/main/scala/org/apache/s2graph/core/storage/hbase/AsynchbaseStorage.scala b/s2core/src/main/scala/org/apache/s2graph/core/storage/hbase/AsynchbaseStorage.scala
index 4bd222f..b5d94e6 100644
--- a/s2core/src/main/scala/org/apache/s2graph/core/storage/hbase/AsynchbaseStorage.scala
+++ b/s2core/src/main/scala/org/apache/s2graph/core/storage/hbase/AsynchbaseStorage.scala
@@ -342,14 +342,16 @@ class AsynchbaseStorage(override val config: Config)(implicit ec: ExecutionConte
val edgeWithIndex = edge.edgesWithIndex.head
val countWithTs = edge.propsWithTs(LabelMeta.countSeq)
val countVal = countWithTs.innerVal.toString().toLong
- val incr = buildIncrementsCountAsync(edgeWithIndex, countVal).head
- val request = incr.asInstanceOf[AtomicIncrementRequest]
- _client.bufferAtomicIncrement(request) withCallback { resultCount: java.lang.Long =>
+ val kv = buildIncrementsCountAsync(edgeWithIndex, countVal).head
+ val request = new AtomicIncrementRequest(kv.table, kv.row, kv.cf, kv.qualifier, Bytes.toLong(kv.value))
+ val defer = _client.bufferAtomicIncrement(request) withCallback { resultCount: java.lang.Long =>
(true, resultCount.longValue())
} recoverWith { ex =>
logger.error(s"mutation failed. $request", ex)
(false, -1L)
}
+ if (withWait) defer
+ else Deferred.fromResult((true, -1L))
}
val grouped: Deferred[util.ArrayList[(Boolean, Long)]] = Deferred.groupInOrder(defers)