tephra-hbase-compat-2.0-base/src/main/java/org/apache/tephra/hbase/SecondaryIndexTable.java [63:83]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public SecondaryIndexTable(TransactionServiceClient transactionServiceClient, Table table,
                             byte[] secondaryIndex) throws IOException {
    secondaryIndexTableName = TableName.valueOf(table.getName().getNameAsString() + ".idx");
    this.connection = ConnectionFactory.createConnection(table.getConfiguration());
    Table secondaryIndexHTable = null;
    try (Admin hBaseAdmin = this.connection.getAdmin()) {
      if (!hBaseAdmin.tableExists(secondaryIndexTableName)) {
        hBaseAdmin.createTable(TableDescriptorBuilder.newBuilder(secondaryIndexTableName).build());
      }
      secondaryIndexHTable = this.connection.getTable(secondaryIndexTableName);
    } catch (Exception e) {
      Closeables.closeQuietly(connection);
      Throwables.propagate(e);
    }

    this.secondaryIndex = secondaryIndex;
    this.transactionAwareHTable = new TransactionAwareHTable(table);
    this.secondaryIndexTable = new TransactionAwareHTable(secondaryIndexHTable);
    this.transactionContext = new TransactionContext(transactionServiceClient, transactionAwareHTable,
                                                     secondaryIndexTable);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tephra-hbase-compat-2.3/src/main/java/org/apache/tephra/hbase/SecondaryIndexTable.java [63:83]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public SecondaryIndexTable(TransactionServiceClient transactionServiceClient, Table table,
                             byte[] secondaryIndex) throws IOException {
    secondaryIndexTableName = TableName.valueOf(table.getName().getNameAsString() + ".idx");
    this.connection = ConnectionFactory.createConnection(table.getConfiguration());
    Table secondaryIndexHTable = null;
    try (Admin hBaseAdmin = this.connection.getAdmin()) {
      if (!hBaseAdmin.tableExists(secondaryIndexTableName)) {
        hBaseAdmin.createTable(TableDescriptorBuilder.newBuilder(secondaryIndexTableName).build());
      }
      secondaryIndexHTable = this.connection.getTable(secondaryIndexTableName);
    } catch (Exception e) {
      Closeables.closeQuietly(connection);
      Throwables.propagate(e);
    }

    this.secondaryIndex = secondaryIndex;
    this.transactionAwareHTable = new TransactionAwareHTable(table);
    this.secondaryIndexTable = new TransactionAwareHTable(secondaryIndexHTable);
    this.transactionContext = new TransactionContext(transactionServiceClient, transactionAwareHTable,
                                                     secondaryIndexTable);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tephra-hbase-compat-2.4/src/main/java/org/apache/tephra/hbase/SecondaryIndexTable.java [63:83]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public SecondaryIndexTable(TransactionServiceClient transactionServiceClient, Table table,
                             byte[] secondaryIndex) throws IOException {
    secondaryIndexTableName = TableName.valueOf(table.getName().getNameAsString() + ".idx");
    this.connection = ConnectionFactory.createConnection(table.getConfiguration());
    Table secondaryIndexHTable = null;
    try (Admin hBaseAdmin = this.connection.getAdmin()) {
      if (!hBaseAdmin.tableExists(secondaryIndexTableName)) {
        hBaseAdmin.createTable(TableDescriptorBuilder.newBuilder(secondaryIndexTableName).build());
      }
      secondaryIndexHTable = this.connection.getTable(secondaryIndexTableName);
    } catch (Exception e) {
      Closeables.closeQuietly(connection);
      Throwables.propagate(e);
    }

    this.secondaryIndex = secondaryIndex;
    this.transactionAwareHTable = new TransactionAwareHTable(table);
    this.secondaryIndexTable = new TransactionAwareHTable(secondaryIndexHTable);
    this.transactionContext = new TransactionContext(transactionServiceClient, transactionAwareHTable,
                                                     secondaryIndexTable);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



