You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "DOYUNG YOON (JIRA)" <ji...@apache.org> on 2016/04/18 10:44:25 UTC

[jira] [Created] (S2GRAPH-64) incrementCounts yield type case exception.

DOYUNG YOON created S2GRAPH-64:
----------------------------------

             Summary: incrementCounts yield type case exception.
                 Key: S2GRAPH-64
                 URL: https://issues.apache.org/jira/browse/S2GRAPH-64
             Project: S2Graph
          Issue Type: Bug
            Reporter: DOYUNG YOON


when call incrementCounts I got following exception.

{noformat}
ClassCastException: org.apache.s2graph.core.storage.SKeyValue cannot be cast to org.hbase.async.AtomicIncrementRequest exception
{noformat}

This is because of invalid type cast on AsynchbaseStorage#incrementCounts. we need to create AtomicIncrementRequest from SKeyValue and use it with client.

{noformat}
val incr = buildIncrementsCountAsync(edgeWithIndex, countVal).head
val request = incr.asInstanceOf[AtomicIncrementRequest]
_client.bufferAtomicIncrement(request) withCallback { resultCount: java.lang.Long =>
           (true, resultCount.longValue())
         }
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)