[ 
https://issues.apache.org/jira/browse/TRAFODION-1444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14692657#comment-14692657
 ] 

ASF GitHub Bot commented on TRAFODION-1444:
-------------------------------------------

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. 


> Reduce the path length for IUD operations in Trafodion in the hbase client 
> layer
> --------------------------------------------------------------------------------
>
>                 Key: TRAFODION-1444
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1444
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: sql-exe
>    Affects Versions: 2.0-incubating
>            Reporter: Selvaganesan Govindarajan
>            Assignee: Selvaganesan Govindarajan
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> There are 3 JNI to java transitions for insert, update, delete, 
> checkAndInsert, checkAndUpdate and checkAndDelete operations. It can be done 
> with one jni transition and reduced memory allocation. 



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

Reply via email to