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

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

Github user prashanth-vasudev commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1532#discussion_r193885236
  
    --- Diff: 
core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java
 ---
    @@ -3226,5 +3260,65 @@ public RecoveryRequestResponse call(TrxRegionService 
instance) throws IOExceptio
     
             return resultArray[0].getResultList();
         }
    +
    +    public void setStoragePolicy(String tblName, String policy)
    +      throws IOException {
    +
    +      int retryCount = 0;
    +      int retrySleep = TM_SLEEP;
    +      boolean retry = false;
    +      try {
    +        Table tbl = connection.getTable(TableName.valueOf(tblName));
    +        String rowkey = "0";
    +        CoprocessorRpcChannel channel = 
tbl.coprocessorService(rowkey.getBytes());
    +        
org.apache.hadoop.hbase.coprocessor.transactional.generated.TrxRegionProtos.TrxRegionService.BlockingInterface
 service =
    +          
org.apache.hadoop.hbase.coprocessor.transactional.generated.TrxRegionProtos.TrxRegionService.newBlockingStub(channel);
    +        
org.apache.hadoop.hbase.coprocessor.transactional.generated.TrxRegionProtos.TrafSetStoragePolicyRequest.Builder
 request =
    +         
org.apache.hadoop.hbase.coprocessor.transactional.generated.TrxRegionProtos.TrafSetStoragePolicyRequest.newBuilder();
    +        String hbaseRoot = config.get("hbase.rootdir");
    +        FileSystem fs = FileSystem.get(config);
    +      //Construct the HDFS dir
    +      //find out if namespace is there
    +      String[] parts = tblName.split(":");
    +      String namespacestr="";
    --- End diff --
    
    One concern here is we make assumptions of hbase internal directory 
structure for the table. This assumption may not hold good between releases. Is 
there any public api that can be used or some uniform way? 


> add create option storage policy
> --------------------------------
>
>                 Key: TRAFODION-3026
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3026
>             Project: Apache Trafodion
>          Issue Type: New Feature
>            Reporter: liu ming
>            Assignee: liu ming
>            Priority: Major
>
> HDFS support HSM, it is possible to specify the storage policy in HBase 
> column family attribute, so it can use the underlying storage policy



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to