congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ThriftServerRunner$HBaseHandler.getAdmin
Code IndexAdd Tabnine to your IDE (free)

How to use
getAdmin
method
in
org.apache.hadoop.hbase.thrift.ThriftServerRunner$HBaseHandler

Best Java code snippets using org.apache.hadoop.hbase.thrift.ThriftServerRunner$HBaseHandler.getAdmin (Showing top 14 results out of 315)

origin: com.aliyun.hbase/alihbase-thrift

@Override
public List<ByteBuffer> getTableNames() throws IOError {
 try {
  TableName[] tableNames = this.getAdmin().listTableNames();
  ArrayList<ByteBuffer> list = new ArrayList<>(tableNames.length);
  for (int i = 0; i < tableNames.length; i++) {
   list.add(ByteBuffer.wrap(tableNames[i].getName()));
  }
  return list;
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public List<ByteBuffer> getTableNames() throws IOError {
 try {
  TableName[] tableNames = this.getAdmin().listTableNames();
  ArrayList<ByteBuffer> list = new ArrayList<>(tableNames.length);
  for (TableName tableName : tableNames) {
   list.add(ByteBuffer.wrap(tableName.getName()));
  }
  return list;
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public void deleteTable(ByteBuffer in_tableName) throws IOError {
 TableName tableName = getTableName(in_tableName);
 if (LOG.isDebugEnabled()) {
  LOG.debug("deleteTable: table=" + tableName);
 }
 try {
  if (!getAdmin().tableExists(tableName)) {
   throw new IOException("table does not exist");
  }
  getAdmin().deleteTable(tableName);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public void createTable(ByteBuffer in_tableName,
  List<ColumnDescriptor> columnFamilies) throws IOError,
  IllegalArgument, AlreadyExists {
 TableName tableName = getTableName(in_tableName);
 try {
  if (getAdmin().tableExists(tableName)) {
   throw new AlreadyExists("table name already in use");
  }
  HTableDescriptor desc = new HTableDescriptor(tableName);
  for (ColumnDescriptor col : columnFamilies) {
   HColumnDescriptor colDesc = ThriftUtilities.colDescFromThrift(col);
   desc.addFamily(colDesc);
  }
  getAdmin().createTable(desc);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } catch (IllegalArgumentException e) {
  LOG.warn(e.getMessage(), e);
  throw new IllegalArgument(Throwables.getStackTraceAsString(e));
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public void createTable(ByteBuffer in_tableName,
  List<ColumnDescriptor> columnFamilies) throws IOError,
  IllegalArgument, AlreadyExists {
 TableName tableName = getTableName(in_tableName);
 try {
  if (getAdmin().tableExists(tableName)) {
   throw new AlreadyExists("table name already in use");
  }
  HTableDescriptor desc = new HTableDescriptor(tableName);
  for (ColumnDescriptor col : columnFamilies) {
   HColumnDescriptor colDesc = ThriftUtilities.colDescFromThrift(col);
   desc.addFamily(colDesc);
  }
  getAdmin().createTable(desc);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } catch (IllegalArgumentException e) {
  LOG.warn(e.getMessage(), e);
  throw new IllegalArgument(Throwables.getStackTraceAsString(e));
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public void deleteTable(ByteBuffer in_tableName) throws IOError {
 TableName tableName = getTableName(in_tableName);
 if (LOG.isDebugEnabled()) {
  LOG.debug("deleteTable: table={}", tableName);
 }
 try {
  if (!getAdmin().tableExists(tableName)) {
   throw new IOException("table does not exist");
  }
  getAdmin().deleteTable(tableName);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError {
 try {
  try {
   getAdmin().compactRegion(getBytes(tableNameOrRegionName));
  } catch (IllegalArgumentException e) {
   // Invalid region, try table
   getAdmin().compact(TableName.valueOf(getBytes(tableNameOrRegionName)));
  }
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public void compact(ByteBuffer tableNameOrRegionName) throws IOError {
 try {
  try {
   getAdmin().compactRegion(getBytes(tableNameOrRegionName));
  } catch (IllegalArgumentException e) {
   // Invalid region, try table
   getAdmin().compact(TableName.valueOf(getBytes(tableNameOrRegionName)));
  }
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public void compact(ByteBuffer tableNameOrRegionName) throws IOError {
 try {
  try {
   getAdmin().compactRegion(getBytes(tableNameOrRegionName));
  } catch (IllegalArgumentException e) {
   // Invalid region, try table
   getAdmin().compact(TableName.valueOf(getBytes(tableNameOrRegionName)));
  }
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError {
 try {
  try {
   getAdmin().compactRegion(getBytes(tableNameOrRegionName));
  } catch (IllegalArgumentException e) {
   // Invalid region, try table
   getAdmin().compact(TableName.valueOf(getBytes(tableNameOrRegionName)));
  }
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public void disableTable(ByteBuffer tableName) throws IOError{
 try{
  getAdmin().disableTable(getTableName(tableName));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public void disableTable(ByteBuffer tableName) throws IOError{
 try{
  getAdmin().disableTable(getTableName(tableName));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public void enableTable(ByteBuffer tableName) throws IOError {
 try{
  getAdmin().enableTable(getTableName(tableName));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public void enableTable(ByteBuffer tableName) throws IOError {
 try{
  getAdmin().enableTable(getTableName(tableName));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 }
}
org.apache.hadoop.hbase.thriftThriftServerRunner$HBaseHandlergetAdmin

Javadoc

Obtain HBaseAdmin. Creates the instance if it is not already created.

Popular methods of ThriftServerRunner$HBaseHandler

  • <init>
  • deleteAllRowTs
  • deleteAllTs
  • get
    Note: this internal interface is slightly different from public APIs in regard to handling of the qu
  • getRowWithColumnsTs
  • getVerTs
    Note: this internal interface is slightly different from public APIs in regard to handling of the qu
  • increment
  • mutateRowTs
  • mutateRowsTs
  • addScanner
    Assigns a unique ID to the scanner and adds the mapping to an internal hash-map.
  • atomicIncrement
  • getRowsWithColumnsTs
  • atomicIncrement,
  • getRowsWithColumnsTs,
  • getScanner,
  • getTable,
  • getVer,
  • removeScanner,
  • scannerGetList,
  • append,
  • checkAndPut,
  • closeTable

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • String (java.lang)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JLabel (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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