Tabnine Logo
ThriftUtilities.tableNameFromHBase
Code IndexAdd Tabnine to your IDE (free)

How to use
tableNameFromHBase
method
in
org.apache.hadoop.hbase.thrift2.ThriftUtilities

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

origin: apache/hbase

public static List<TTableName> tableNamesFromHBase(TableName[] in) {
 List<TTableName> out = new ArrayList<>(in.length);
 for (TableName tableName : in) {
  out.add(tableNameFromHBase(tableName));
 }
 return out;
}
origin: apache/hbase

public static List<TTableName> tableNamesFromHBase(List<TableName> in) {
 List<TTableName> out = new ArrayList<>(in.size());
 for (TableName tableName : in) {
  out.add(tableNameFromHBase(tableName));
 }
 return out;
}
origin: apache/hbase

@Override
public void disableTable(TableName tableName) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  client.disableTable(tTableName);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public boolean isTableDisabled(TableName tableName) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  return client.isTableDisabled(tTableName);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public boolean tableExists(TableName tableName) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  return client.tableExists(tTableName);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public boolean isTableAvailable(TableName tableName) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  return client.isTableAvailable(tTableName);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public void deleteColumnFamily(TableName tableName, byte[] columnFamily) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  client.deleteColumnFamily(tTableName, ByteBuffer.wrap(columnFamily));
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public void enableTable(TableName tableName) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  client.enableTable(tTableName);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public boolean isTableEnabled(TableName tableName) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  return client.isTableEnabled(tTableName);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public void deleteTable(TableName tableName) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  client.deleteTable(tTableName);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public void truncateTable(TableName tableName, boolean preserveSplits) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  client.truncateTable(tTableName, preserveSplits);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public HTableDescriptor getTableDescriptor(TableName tableName)
  throws TableNotFoundException, IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  TTableDescriptor tTableDescriptor = client.getTableDescriptor(tTableName);
  return ThriftUtilities.hTableDescriptorFromThrift(tTableDescriptor);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public void addColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily)
  throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 TColumnFamilyDescriptor tColumnFamilyDescriptor = ThriftUtilities
   .columnFamilyDescriptorFromHBase(columnFamily);
 try {
  client.addColumnFamily(tTableName, tColumnFamilyDescriptor);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public void modifyColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily)
  throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 TColumnFamilyDescriptor tColumnFamilyDescriptor = ThriftUtilities
   .columnFamilyDescriptorFromHBase(columnFamily);
 try {
  client.modifyColumnFamily(tTableName, tColumnFamilyDescriptor);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public TableDescriptor getDescriptor(TableName tableName)
  throws TableNotFoundException, IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 try {
  TTableDescriptor tTableDescriptor = client.getTableDescriptor(tTableName);
  return ThriftUtilities.tableDescriptorFromThrift(tTableDescriptor);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public boolean isTableAvailable(TableName tableName, byte[][] splitKeys) throws IOException {
 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName);
 List<ByteBuffer> splitKeyInBuffer = ThriftUtilities.splitKeyFromHBase(splitKeys);
 try {
  return client.isTableAvailableWithSplit(tTableName, splitKeyInBuffer);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@Override
public TableDescriptor getDescriptor() throws IOException {
 try {
  TTableDescriptor tableDescriptor = client
    .getTableDescriptor(ThriftUtilities.tableNameFromHBase(tableName));
  return ThriftUtilities.tableDescriptorFromThrift(tableDescriptor);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

public static TTableDescriptor tableDescriptorFromHBase(TableDescriptor in) {
 TTableDescriptor out = new TTableDescriptor();
 out.setTableName(tableNameFromHBase(in.getTableName()));
 Map<Bytes, Bytes> attributes = in.getValues();
 for (Map.Entry<Bytes, Bytes> attribute : attributes.entrySet()) {
  out.putToAttributes(ByteBuffer.wrap(attribute.getKey().get()),
    ByteBuffer.wrap(attribute.getValue().get()));
 }
 for (ColumnFamilyDescriptor column : in.getColumnFamilies()) {
  out.addToColumns(columnFamilyDescriptorFromHBase(column));
 }
 out.setDurability(durabilityFromHBase(in.getDurability()));
 return out;
}
origin: apache/hbase

@Test
public void testGetTableDescriptor() throws Exception {
 ThriftHBaseServiceHandler handler = createHandler();
 TTableDescriptor tableDescriptor = handler
   .getTableDescriptor(ThriftUtilities.tableNameFromHBase(TableName.valueOf(tableAname)));
 TableDescriptor table = ThriftUtilities.tableDescriptorFromThrift(tableDescriptor);
 assertTrue(table.getTableName().equals(TableName.valueOf(tableAname)));
 assertTrue(table.getColumnFamilies().length == 2);
 assertTrue(table.getColumnFamily(familyAname).getMaxVersions() == 3);
 assertTrue(table.getColumnFamily(familyBname).getMaxVersions() == 2);
}
org.apache.hadoop.hbase.thrift2ThriftUtilitiestableNameFromHBase

Popular methods of ThriftUtilities

  • deleteFromThrift
    Creates a Delete (HBase) from a TDelete (Thrift).
  • getFromThrift
    Creates a Get (HBase) from a TGet (Thrift). This ignores any timestamps set on TColumn objects.
  • incrementFromThrift
  • putFromThrift
    Creates a Put (HBase) from a TPut (Thrift)
  • scanFromThrift
  • deletesFromThrift
    Converts multiple TDeletes (Thrift) into a list of Deletes (HBase).
  • getsFromThrift
    Converts multiple TGets (Thrift) into a list of Gets (HBase).
  • putsFromThrift
    Converts multiple TPuts (Thrift) into a list of Puts (HBase).
  • resultFromHBase
    Creates a TResult (Thrift) from a Result (HBase).
  • resultsFromHBase
    Converts multiple Results (HBase) into a list of TResults (Thrift).
  • addAttributes
    Adds all the attributes into the Operation object
  • appendFromThrift
  • addAttributes,
  • appendFromThrift,
  • compareOpFromThrift,
  • deleteFromHBase,
  • deletesFromHBase,
  • durabilityFromThrift,
  • readTypeFromThrift,
  • regionLocationFromHBase,
  • regionLocationsFromHBase,
  • rowMutationsFromThrift

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • BoxLayout (javax.swing)
  • JTable (javax.swing)
  • Top plugins for Android Studio
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