tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poornachandra <...@git.apache.org>
Subject [GitHub] incubator-tephra pull request #67: TEPHRA-272 Add HBase 2.0 compatibility mo...
Date Tue, 09 Jan 2018 13:39:30 GMT
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/67#discussion_r160398641
  
    --- Diff: tephra-hbase-compat-2.0/src/main/java/org/apache/tephra/hbase/TransactionAwareHTable.java
---
    @@ -0,0 +1,729 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.tephra.hbase;
    +
    +import com.google.protobuf.Descriptors.MethodDescriptor;
    +import com.google.protobuf.Message;
    +import com.google.protobuf.Service;
    +import com.google.protobuf.ServiceException;
    +
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.hadoop.hbase.Cell;
    +import org.apache.hadoop.hbase.CellUtil;
    +import org.apache.hadoop.hbase.CompareOperator;
    +import org.apache.hadoop.hbase.HColumnDescriptor;
    +import org.apache.hadoop.hbase.HTableDescriptor;
    +import org.apache.hadoop.hbase.TableName;
    +import org.apache.hadoop.hbase.client.Append;
    +import org.apache.hadoop.hbase.client.Delete;
    +import org.apache.hadoop.hbase.client.Durability;
    +import org.apache.hadoop.hbase.client.Get;
    +import org.apache.hadoop.hbase.client.Increment;
    +import org.apache.hadoop.hbase.client.Mutation;
    +import org.apache.hadoop.hbase.client.OperationWithAttributes;
    +import org.apache.hadoop.hbase.client.Put;
    +import org.apache.hadoop.hbase.client.Result;
    +import org.apache.hadoop.hbase.client.ResultScanner;
    +import org.apache.hadoop.hbase.client.Row;
    +import org.apache.hadoop.hbase.client.RowMutations;
    +import org.apache.hadoop.hbase.client.Scan;
    +import org.apache.hadoop.hbase.client.Table;
    +import org.apache.hadoop.hbase.client.TableDescriptor;
    +import org.apache.hadoop.hbase.client.coprocessor.Batch;
    +import org.apache.hadoop.hbase.client.coprocessor.Batch.Callback;
    +import org.apache.hadoop.hbase.filter.CompareFilter;
    +import org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel;
    +import org.apache.tephra.AbstractTransactionAwareTable;
    +import org.apache.tephra.Transaction;
    +import org.apache.tephra.TransactionAware;
    +import org.apache.tephra.TxConstants;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.NavigableMap;
    +import java.util.Set;
    +import java.util.concurrent.TimeUnit;
    +
    +/**
    + * A Transaction Aware HTable implementation for HBase 2.0. Operations are committed
as usual, but
    + * upon a failed or aborted transaction, they are rolled back to the state before the
transaction
    + * was started.
    + */
    +public class TransactionAwareHTable extends AbstractTransactionAwareTable
    +        implements Table, TransactionAware {
    +
    +    private static final Logger LOG = LoggerFactory.getLogger(TransactionAwareHTable.class);
    --- End diff --
    
    The convention in Tephra is to use 2 spaces for indentation, this class uses 4 spaces.


---

Mime
View raw message