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

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

Github user traflm commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1532#discussion_r193921620
  
    --- 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 --
    
    The API is only available at HBase 2.0.  But I don't know when Trafodion 
will support HBase 2.0. And this feature is required by a customer, so we 
cannnot wait for months. This is a temp solution, once we move to HBase 2.0, 
most of these code can be eliminated and using HBase public API.


> 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