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

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

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

origin: apache/hbase

/**
 * Converts multiple {@link TGet}s (Thrift) into a list of {@link Get}s (HBase).
 *
 * @param in list of <code>TGet</code>s to convert
 *
 * @return list of <code>Get</code> objects
 *
 * @throws IOException if an invalid time range or max version parameter is given
 * @see #getFromThrift(TGet)
 */
public static List<Get> getsFromThrift(List<TGet> in) throws IOException {
 List<Get> out = new ArrayList<>(in.size());
 for (TGet get : in) {
  out.add(getFromThrift(get));
 }
 return out;
}
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 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

Get get = getFromThrift(tGet);
assertArrayEquals(get.getAttribute("attribute1"), attributeValue);
origin: apache/hbase

@Test
public void testConsistency() throws Exception {
 byte[] rowName = Bytes.toBytes("testConsistency");
 TGet tGet = new TGet(wrap(rowName));
 tGet.setConsistency(TConsistency.STRONG);
 Get get = getFromThrift(tGet);
 assertEquals(Consistency.STRONG, get.getConsistency());
 tGet.setConsistency(TConsistency.TIMELINE);
 tGet.setTargetReplicaId(1);
 get = getFromThrift(tGet);
 assertEquals(Consistency.TIMELINE, get.getConsistency());
 assertEquals(1, get.getReplicaId());
 TScan tScan = new TScan();
 tScan.setConsistency(TConsistency.STRONG);
 Scan scan = scanFromThrift(tScan);
 assertEquals(Consistency.STRONG, scan.getConsistency());
 tScan.setConsistency(TConsistency.TIMELINE);
 tScan.setTargetReplicaId(1);
 scan = scanFromThrift(tScan);
 assertEquals(Consistency.TIMELINE, scan.getConsistency());
 assertEquals(1, scan.getReplicaId());
 TResult tResult = new TResult();
 assertFalse(tResult.isSetStale());
 tResult.setStale(true);
 assertTrue(tResult.isSetStale());
}
origin: co.cask.hbase/hbase

/**
 * Converts multiple {@link TGet}s (Thrift) into a list of {@link Get}s (HBase).
 * 
 * @param in list of <code>TGet</code>s to convert
 * 
 * @return list of <code>Get</code> objects
 * 
 * @throws IOException if an invalid time range or max version parameter is given
 * @see #getFromThrift(TGet)
 */
public static List<Get> getsFromThrift(List<TGet> in) throws IOException {
 List<Get> out = new ArrayList<Get>(in.size());
 for (TGet get : in) {
  out.add(getFromThrift(get));
 }
 return out;
}
origin: org.apache.hbase/hbase-thrift

/**
 * Converts multiple {@link TGet}s (Thrift) into a list of {@link Get}s (HBase).
 *
 * @param in list of <code>TGet</code>s to convert
 *
 * @return list of <code>Get</code> objects
 *
 * @throws IOException if an invalid time range or max version parameter is given
 * @see #getFromThrift(TGet)
 */
public static List<Get> getsFromThrift(List<TGet> in) throws IOException {
 List<Get> out = new ArrayList<>(in.size());
 for (TGet get : in) {
  out.add(getFromThrift(get));
 }
 return out;
}
origin: com.aliyun.hbase/alihbase-thrift

/**
 * Converts multiple {@link TGet}s (Thrift) into a list of {@link Get}s (HBase).
 *
 * @param in list of <code>TGet</code>s to convert
 *
 * @return list of <code>Get</code> objects
 *
 * @throws IOException if an invalid time range or max version parameter is given
 * @see #getFromThrift(TGet)
 */
public static List<Get> getsFromThrift(List<TGet> in) throws IOException {
 List<Get> out = new ArrayList<>(in.size());
 for (TGet get : in) {
  out.add(getFromThrift(get));
 }
 return out;
}
origin: co.cask.hbase/hbase

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

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

@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: com.aliyun.hbase/alihbase-thrift

@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: org.apache.hbase/hbase-thrift

@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: com.aliyun.hbase/alihbase-thrift

@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: org.apache.hbase/hbase-thrift

Get get = getFromThrift(tGet);
assertArrayEquals(get.getAttribute("attribute1"), attributeValue);
origin: com.aliyun.hbase/alihbase-thrift

Get get = getFromThrift(tGet);
assertArrayEquals(get.getAttribute("attribute1"), attributeValue);
org.apache.hadoop.hbase.thrift2ThriftUtilitiesgetFromThrift

Javadoc

Creates a Get (HBase) from a TGet (Thrift). This ignores any timestamps set on TColumn objects.

Popular methods of ThriftUtilities

  • deleteFromThrift
    Creates a Delete (HBase) from a TDelete (Thrift).
  • 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
  • compareOpFromThrift
  • appendFromThrift,
  • compareOpFromThrift,
  • deleteFromHBase,
  • deletesFromHBase,
  • durabilityFromThrift,
  • readTypeFromThrift,
  • regionLocationFromHBase,
  • regionLocationsFromHBase,
  • rowMutationsFromThrift

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • startActivity (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top PhpStorm plugins
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