trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: [TRAFODION-1444] Reduced pathlen...
Date Wed, 12 Aug 2015 00:41:18 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/52#discussion_r36816805
  
    --- Diff: core/sql/executor/HBaseClient.java ---
    @@ -1421,6 +1422,80 @@ public int startGet(long jniObject, String tblName, boolean useTRex,
long transI
           return htc.startGet(transID, rowIDs, columns, timestamp);
       }
     
    +  public boolean insertRow(long jniObject, String tblName, boolean useTRex, long transID,
byte[] rowID,
    +                         Object row,
    +                         long timestamp,
    +                         boolean checkAndPut,
    +                         boolean asyncOperation) throws IOException, InterruptedException,
ExecutionException {
    +
    +      HTableClient htc = getHTableClient(jniObject, tblName, useTRex);
    +      boolean ret = htc.putRow(transID, rowID, row, null, null,
    +                                checkAndPut, asyncOperation);
    +      if (asyncOperation == false)
    +         releaseHTableClient(htc);
    +      return ret;
    +  }
    +
    +  public boolean checkAndUpdateRow(long jniObject, String tblName, boolean useTRex, long
transID, byte[] rowID,
    +                         Object columnsToUpdate,
    +                         byte[] columnToCheck, byte[] columnValToCheck,
    +                         long timestamp,
    +                         boolean asyncOperation) throws IOException, InterruptedException,
ExecutionException {
    +      boolean checkAndPut = true;
    +      HTableClient htc = getHTableClient(jniObject, tblName, useTRex);
    +      boolean ret = htc.putRow(transID, rowID, columnsToUpdate, columnToCheck, columnValToCheck,
    +                                checkAndPut, asyncOperation);
    +      if (asyncOperation == false)
    +         releaseHTableClient(htc);
    +      return ret;
    +  }
    +
    +  public boolean insertRows(long jniObject, String tblName, boolean useTRex, long transID,

    +			 short rowIDLen,
    +                         Object rowIDs,
    +                         Object rows,
    +                         long timestamp,
    +                         boolean autoFlush,
    +                         boolean asyncOperation) throws IOException, InterruptedException,
ExecutionException {
    +      HTableClient htc = getHTableClient(jniObject, tblName, useTRex);
    +      boolean ret = htc.putRows(transID, rowIDLen, rowIDs, rows, timestamp, autoFlush,
asyncOperation);
    +      if (asyncOperation == false)
    +         releaseHTableClient(htc);
    +      return ret;
    +  }
    +
    +  public boolean deleteRow(long jniObject, String tblName, boolean useTRex, long transID,

    +                                 byte[] rowID,
    +                                 Object[] columns,
    +                                 long timestamp, boolean asyncOperation) throws IOException
{
    +      HTableClient htc = getHTableClient(jniObject, tblName, useTRex);
    --- End diff --
    
    Yes. It should return IOException. And the IOException is translated into an error in
the JNI layer. It is no different from calling these methods separately from JNI. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message