Tabnine Logo
org.apache.hadoop.hbase.client
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.hadoop.hbase.client

Best Java code snippets using org.apache.hadoop.hbase.client (Showing top 20 results out of 2,574)

origin: apache/flink

@Override
public void closeInputFormat() throws IOException {
  try {
    if (table != null) {
      table.close();
    }
  } finally {
    table = null;
  }
}
origin: alibaba/canal

  public void close() throws IOException {
    if (conn != null) {
      conn.close();
    }
  }
}
origin: apache/flink

@Override
protected Scan getScanner() {
  Scan scan = new Scan();
  for (int f = 0; f < families.length; f++) {
    byte[] family = families[f];
    for (int q = 0; q < qualifiers[f].length; q++) {
      byte[] quantifier = qualifiers[f][q];
      scan.addColumn(family, quantifier);
    }
  }
  return scan;
}
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  Get g = new Get(TEST_ROW);
  g.addFamily(family2);
  try (Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(tableName)) {
   t.get(g);
  }
  return null;
 }
};
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  Delete d = new Delete(TEST_ROW);
  d.addFamily(family1);
  try (Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(tableName)) {
   t.delete(d);
  }
  return null;
 }
};
origin: apache/hbase

public boolean isMergeInProgress() throws IOException {
 Get get = new Get(MERGE_OP_ROW);
 try (Table table = connection.getTable(tableName)) {
  Result res = table.get(get);
  return (!res.isEmpty());
 }
}
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  Delete d = new Delete(TEST_ROW);
  d.addColumn(family1, qualifier);
  // d.deleteFamily(family1);
  try (Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(tableName)) {
   t.delete(d);
  }
  return null;
 }
};
origin: apache/hbase

private void createTableWithCoprocessor(TableName tableName, String coprocessor)
  throws IOException {
 TableDescriptor tableDesc = TableDescriptorBuilder.newBuilder(tableName)
   .setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(CF1_BYTES).build())
   .setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(CF2_BYTES).build())
   .setCoprocessor(coprocessor).build();
 connection.getAdmin().createTable(tableDesc);
}
origin: apache/hbase

 @Override
 protected ScannerCallable createScannerCallable() {
  if (!scan.includeStartRow() && !isEmptyStartRow(scan.getStartRow())) {
   // we have not implemented locate to next row for sync client yet, so here we change the
   // inclusive of start row to true.
   scan.withStartRow(createClosestRowAfter(scan.getStartRow()), true);
  }
  return new ScannerCallable(getConnection(), getTable(), scan, this.scanMetrics,
    this.rpcControllerFactory);
 }
}
origin: apache/hbase

@Override
public CompletableFuture<Result> get(Get get) {
 return timelineConsistentRead(conn.getLocator(), tableName, get, get.getRow(),
  RegionLocateType.CURRENT, replicaId -> get(get, replicaId), readRpcTimeoutNs,
  conn.connConf.getPrimaryCallTimeoutNs(), retryTimer);
}
origin: apache/hbase

public static ScanResultCache createScanResultCache(Scan scan) {
 if (scan.getAllowPartialResults()) {
  return new AllowPartialScanResultCache();
 } else if (scan.getBatch() > 0) {
  return new BatchScanResultCache(scan.getBatch());
 } else {
  return new CompleteScanResultCache();
 }
}
origin: apache/hbase

 @Override
 protected Void postOperationResult(final Void result, final long deadlineTs)
   throws IOException, TimeoutException {
  // Delete cached information to prevent clients from using old locations
  ((ClusterConnection) getAdmin().getConnection()).clearRegionCache(getTableName());
  return super.postOperationResult(result, deadlineTs);
 }
}
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  try(Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(TEST_TABLE)) {
   return t.get(new Get(TEST_ROW));
  }
 }
};
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  Delete d = new Delete(TEST_ROW);
  d.addFamily(family2);
  try (Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(tableName)) {
   t.delete(d);
  }
  return null;
 }
};
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  Get g = new Get(TEST_ROW);
  g.addFamily(family1);
  try (Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(tableName)) {
   t.get(g);
  }
  return null;
 }
};
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  Delete d = new Delete(TEST_ROW);
  d.addFamily(TEST_FAMILY);
  try(Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(TEST_TABLE)) {
   t.delete(d);
  }
  return null;
 }
};
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  Get g = new Get(TEST_ROW);
  g.addFamily(TEST_FAMILY);
  try(Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(TEST_TABLE)) {
   t.get(g);
  }
  return null;
 }
};
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  Delete d = new Delete(TEST_ROW);
  d.addFamily(family1);
  d.addFamily(family2);
  try (Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(tableName)) {
   t.delete(d);
  }
  return null;
 }
};
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  try(Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(TEST_TABLE)) {
   return t.get(new Get(TEST_ROW));
  }
 }
};
origin: apache/hbase

 @Override
 public Object run() throws Exception {
  try(Connection conn = ConnectionFactory.createConnection(conf);
    Table t = conn.getTable(TEST_TABLE)) {
   return t.get(new Get(TEST_ROW));
  }
 }
};
org.apache.hadoop.hbase.client

Most used classes

  • Result
    Single row result of a Get or Scan query. This class is NOT THREAD SAFE. Convenience methods are a
  • Put
    Used to perform Put operations for a single row. To perform a Put, instantiate a Put object with the
  • Scan
    Used to perform Scan operations. All operations are identical to Get with the exception of instantia
  • Get
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Delete
    Used to perform Delete operations on a single row. To delete an entire row, instantiate a Delete obj
  • Connection,
  • HBaseAdmin,
  • HTable,
  • ConnectionFactory,
  • Table,
  • Admin,
  • HTableInterface,
  • Increment,
  • RegionLocator,
  • BufferedMutator,
  • HConnectionManager,
  • HConnection,
  • RegionInfo,
  • RowMutations
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now