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

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

Best Java code snippets using org.apache.hadoop.hbase.thrift2 (Showing top 20 results out of 315)

origin: apache/hbase

@Override
protected HBaseServiceHandler createHandler(Configuration conf, UserProvider userProvider)
  throws IOException {
 return new ThriftHBaseServiceHandler(conf, userProvider);
}
origin: apache/hbase

private void checkReadOnlyMode() throws TIOError {
 if (isReadOnly()) {
  throw getTIOError(ioe);
 }
}
origin: apache/hbase

 @Override
 public Void run() throws Exception {
  client.run();
  return null;
 }
});
origin: apache/hbase

@Override
public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException {
 checkReadOnlyMode();
 Table htable = getTable(table);
 try {
  return resultFromHBase(htable.increment(incrementFromThrift(increment)));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public TResult get(ByteBuffer table, TGet get) throws TIOError, TException {
 Table htable = getTable(table);
 try {
  return resultFromHBase(htable.get(getFromThrift(get)));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public int openScanner(ByteBuffer table, TScan scan) throws TIOError, TException {
 Table htable = getTable(table);
 ResultScanner resultScanner = null;
 try {
  resultScanner = htable.getScanner(scanFromThrift(scan));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
 return addScanner(resultScanner);
}
origin: apache/hbase

@Override
public TResult append(ByteBuffer table, TAppend append) throws TIOError, TException {
 checkReadOnlyMode();
 Table htable = getTable(table);
 try {
  return resultFromHBase(htable.append(appendFromThrift(append)));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public void deleteSingle(ByteBuffer table, TDelete deleteSingle) throws TIOError, TException {
 checkReadOnlyMode();
 Table htable = getTable(table);
 try {
  htable.delete(deleteFromThrift(deleteSingle));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public void put(ByteBuffer table, TPut put) throws TIOError, TException {
 checkReadOnlyMode();
 Table htable = getTable(table);
 try {
  htable.put(putFromThrift(put));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public List<TResult> getMultiple(ByteBuffer table, List<TGet> gets) throws TIOError, TException {
 Table htable = getTable(table);
 try {
  return resultsFromHBase(htable.get(getsFromThrift(gets)));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public void putMultiple(ByteBuffer table, List<TPut> puts) throws TIOError, TException {
 checkReadOnlyMode();
 Table htable = getTable(table);
 try {
  htable.put(putsFromThrift(puts));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException {
 checkReadOnlyMode();
 Table htable = getTable(table);
 try {
  htable.mutateRow(rowMutationsFromThrift(rowMutations));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public void createTable(TTableDescriptor desc, List<ByteBuffer> splitKeys)
  throws TIOError, TException {
 try {
  TableDescriptor descriptor = tableDescriptorFromThrift(desc);
  byte[][] split = splitKeyFromThrift(splitKeys);
  connectionCache.getAdmin().createTable(descriptor, split);
 } catch (IOException e) {
  throw getTIOError(e);
 }
}
origin: apache/hbase

@Override
public List<TTableDescriptor> getTableDescriptors(List<TTableName> tables)
  throws TIOError, TException {
 try {
  List<TableName> tableNames = ThriftUtilities.tableNamesFromThrift(tables);
  List<TableDescriptor> tableDescriptors = connectionCache.getAdmin()
    .listTableDescriptors(tableNames);
  return tableDescriptorsFromHBase(tableDescriptors);
 } catch (IOException e) {
  throw getTIOError(e);
 }
}
origin: apache/hbase

@Override
public void modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column)
  throws TIOError, TException {
 try {
  TableName table = tableNameFromThrift(tableName);
  ColumnFamilyDescriptor columnFamilyDescriptor = columnFamilyDescriptorFromThrift(column);
  connectionCache.getAdmin().modifyColumnFamily(table, columnFamilyDescriptor);
 } catch (IOException e) {
  throw getTIOError(e);
 }
}
origin: apache/hbase

@Override
public void modifyTable(TTableDescriptor desc) throws TIOError, TException {
 try {
  TableDescriptor descriptor = tableDescriptorFromThrift(desc);
  connectionCache.getAdmin().modifyTable(descriptor);
 } catch (IOException e) {
  throw getTIOError(e);
 }
}
origin: apache/hbase

@Override
public boolean isTableAvailable(TTableName tableName) throws TIOError, TException {
 try {
  TableName table = tableNameFromThrift(tableName);
  return connectionCache.getAdmin().isTableAvailable(table);
 } catch (IOException e) {
  throw getTIOError(e);
 }
}
origin: apache/hbase

@Override
public void createNamespace(TNamespaceDescriptor namespaceDesc) throws TIOError, TException {
 try {
  NamespaceDescriptor descriptor = namespaceDescriptorFromThrift(namespaceDesc);
  connectionCache.getAdmin().createNamespace(descriptor);
 } catch (IOException e) {
  throw getTIOError(e);
 }
}
origin: apache/hbase

@Override
public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException {
 Table htable = getTable(table);
 try {
  return htable.exists(getFromThrift(get));
 } catch (IOException e) {
  throw getTIOError(e);
 } finally {
  closeTable(htable);
 }
}
origin: apache/hbase

@Override
public boolean tableExists(TTableName tTableName) throws TIOError, TException {
 try {
  TableName tableName = tableNameFromThrift(tTableName);
  return connectionCache.getAdmin().tableExists(tableName);
 } catch (IOException e) {
  throw getTIOError(e);
 }
}
org.apache.hadoop.hbase.thrift2

Most used classes

  • TColumnValue
    Represents a single cell and its value.
  • TResult
    if no Result is found, row and columnValues will not be set.
  • TGet
    Used to perform Get operations on a single row. The scope can be further narrowed down by specifying
  • THBaseService$Client
  • THBaseService$Iface
  • TScan,
  • TTimeRange,
  • TColumn,
  • TColumnIncrement,
  • TDelete,
  • TIOError,
  • TIncrement,
  • TAppend,
  • TAuthorization,
  • TCellVisibility,
  • TMutation,
  • TRowMutations,
  • ThriftHBaseServiceHandler,
  • ThriftServer
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