Tabnine Logo
ThriftServerRunner$HBaseHandler.addScanner
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: co.cask.hbase/hbase

@Override
public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow,
  List<ByteBuffer> columns,
  Map<ByteBuffer, ByteBuffer> attributes) throws IOError {
 try {
  HTable table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow));
  addAttributes(scan, attributes);
  if(columns != null && columns.size() != 0) {
   for(ByteBuffer column : columns) {
    byte [][] famQf = KeyValue.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw new IOError(e.getMessage());
 }
}
origin: co.cask.hbase/hbase

@Override
public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow,
  List<ByteBuffer> columns, long timestamp,
  Map<ByteBuffer, ByteBuffer> attributes) throws IOError, TException {
 try {
  HTable table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow));
  addAttributes(scan, attributes);
  scan.setTimeRange(Long.MIN_VALUE, timestamp);
  if (columns != null && columns.size() != 0) {
   for (ByteBuffer column : columns) {
    byte [][] famQf = KeyValue.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw new IOError(e.getMessage());
 }
}
origin: co.cask.hbase/hbase

@Override
public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow,
  ByteBuffer stopRow, List<ByteBuffer> columns,
  Map<ByteBuffer, ByteBuffer> attributes)
  throws IOError, TException {
 try {
  HTable table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow), getBytes(stopRow));
  addAttributes(scan, attributes);
  if(columns != null && columns.size() != 0) {
   for(ByteBuffer column : columns) {
    byte [][] famQf = KeyValue.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw new IOError(e.getMessage());
 }
}
origin: org.apache.hbase/hbase-thrift

  scan.setCacheBlocks(tScan.isCacheBlocks());
 return addScanner(table.getScanner(scan), tScan.sortColumns);
} catch (IOException e) {
 LOG.warn(e.getMessage(), e);
origin: com.aliyun.hbase/alihbase-thrift

  scan.setCacheBlocks(tScan.isCacheBlocks());
 return addScanner(table.getScanner(scan), tScan.sortColumns);
} catch (IOException e) {
 LOG.warn(e.getMessage(), e);
origin: co.cask.hbase/hbase

    parseFilter.parseFilterString(tScan.getFilterString()));
 return addScanner(table.getScanner(scan));
} catch (IOException e) {
 LOG.warn(e.getMessage(), e);
origin: org.apache.hbase/hbase-thrift

 return addScanner(table.getScanner(scan), false);
} catch (IOException e) {
 LOG.warn(e.getMessage(), e);
origin: com.aliyun.hbase/alihbase-thrift

 return addScanner(table.getScanner(scan), false);
} catch (IOException e) {
 LOG.warn(e.getMessage(), e);
origin: org.apache.hbase/hbase-thrift

@Override
public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow,
  ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp,
  Map<ByteBuffer, ByteBuffer> attributes)
  throws IOError, TException {
 Table table = null;
 try {
  table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow), getBytes(stopRow));
  addAttributes(scan, attributes);
  scan.setTimeRange(0, timestamp);
  if (columns != null && !columns.isEmpty()) {
   for (ByteBuffer column : columns) {
    byte [][] famQf = CellUtil.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  scan.setTimeRange(0, timestamp);
  return addScanner(table.getScanner(scan), false);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } finally{
  closeTable(table);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow,
  ByteBuffer stopRow, List<ByteBuffer> columns,
  Map<ByteBuffer, ByteBuffer> attributes)
  throws IOError, TException {
 Table table = null;
 try {
  table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow), getBytes(stopRow));
  addAttributes(scan, attributes);
  if(columns != null && columns.size() != 0) {
   for(ByteBuffer column : columns) {
    byte [][] famQf = CellUtil.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan), false);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } finally{
  closeTable(table);
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow,
  ByteBuffer stopRow, List<ByteBuffer> columns,
  Map<ByteBuffer, ByteBuffer> attributes)
  throws IOError, TException {
 Table table = null;
 try {
  table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow), getBytes(stopRow));
  addAttributes(scan, attributes);
  if(columns != null && !columns.isEmpty()) {
   for(ByteBuffer column : columns) {
    byte [][] famQf = CellUtil.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan), false);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } finally{
  closeTable(table);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow,
  ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp,
  Map<ByteBuffer, ByteBuffer> attributes)
  throws IOError, TException {
 Table table = null;
 try {
  table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow), getBytes(stopRow));
  addAttributes(scan, attributes);
  scan.setTimeRange(0, timestamp);
  if (columns != null && columns.size() != 0) {
   for (ByteBuffer column : columns) {
    byte [][] famQf = CellUtil.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  scan.setTimeRange(0, timestamp);
  return addScanner(table.getScanner(scan), false);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } finally{
  closeTable(table);
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow,
  List<ByteBuffer> columns,
  Map<ByteBuffer, ByteBuffer> attributes) throws IOError {
 Table table = null;
 try {
  table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow));
  addAttributes(scan, attributes);
  if(columns != null && !columns.isEmpty()) {
   for(ByteBuffer column : columns) {
    byte [][] famQf = CellUtil.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan), false);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } finally{
  closeTable(table);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow,
  List<ByteBuffer> columns, long timestamp,
  Map<ByteBuffer, ByteBuffer> attributes) throws IOError, TException {
 Table table = null;
 try {
  table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow));
  addAttributes(scan, attributes);
  scan.setTimeRange(0, timestamp);
  if (columns != null && columns.size() != 0) {
   for (ByteBuffer column : columns) {
    byte [][] famQf = CellUtil.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan), false);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } finally{
  closeTable(table);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

@Override
public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow,
  List<ByteBuffer> columns,
  Map<ByteBuffer, ByteBuffer> attributes) throws IOError {
 Table table = null;
 try {
  table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow));
  addAttributes(scan, attributes);
  if(columns != null && columns.size() != 0) {
   for(ByteBuffer column : columns) {
    byte [][] famQf = CellUtil.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan), false);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } finally{
  closeTable(table);
 }
}
origin: co.cask.hbase/hbase

@Override
public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow,
  ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp,
  Map<ByteBuffer, ByteBuffer> attributes)
  throws IOError, TException {
 try {
  HTable table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow), getBytes(stopRow));
  addAttributes(scan, attributes);
  scan.setTimeRange(Long.MIN_VALUE, timestamp);
  if (columns != null && columns.size() != 0) {
   for (ByteBuffer column : columns) {
    byte [][] famQf = KeyValue.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  scan.setTimeRange(Long.MIN_VALUE, timestamp);
  return addScanner(table.getScanner(scan));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw new IOError(e.getMessage());
 }
}
origin: co.cask.hbase/hbase

@Override
public int scannerOpenWithPrefix(ByteBuffer tableName,
                 ByteBuffer startAndPrefix,
                 List<ByteBuffer> columns,
  Map<ByteBuffer, ByteBuffer> attributes)
  throws IOError, TException {
 try {
  HTable table = getTable(tableName);
  Scan scan = new Scan(getBytes(startAndPrefix));
  addAttributes(scan, attributes);
  Filter f = new WhileMatchFilter(
    new PrefixFilter(getBytes(startAndPrefix)));
  scan.setFilter(f);
  if (columns != null && columns.size() != 0) {
   for(ByteBuffer column : columns) {
    byte [][] famQf = KeyValue.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan));
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw new IOError(e.getMessage());
 }
}
origin: org.apache.hbase/hbase-thrift

@Override
public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow,
  List<ByteBuffer> columns, long timestamp,
  Map<ByteBuffer, ByteBuffer> attributes) throws IOError, TException {
 Table table = null;
 try {
  table = getTable(tableName);
  Scan scan = new Scan(getBytes(startRow));
  addAttributes(scan, attributes);
  scan.setTimeRange(0, timestamp);
  if (columns != null && !columns.isEmpty()) {
   for (ByteBuffer column : columns) {
    byte [][] famQf = CellUtil.parseColumn(getBytes(column));
    if(famQf.length == 1) {
     scan.addFamily(famQf[0]);
    } else {
     scan.addColumn(famQf[0], famQf[1]);
    }
   }
  }
  return addScanner(table.getScanner(scan), false);
 } catch (IOException e) {
  LOG.warn(e.getMessage(), e);
  throw getIOError(e);
 } finally{
  closeTable(table);
 }
}
org.apache.hadoop.hbase.thriftThriftServerRunner$HBaseHandleraddScanner

Javadoc

Assigns a unique ID to the scanner and adds the mapping to an internal hash-map.

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
  • atomicIncrement
  • getRowsWithColumnsTs
  • getScanner
    Returns the scanner associated with the specified ID.
  • getRowsWithColumnsTs,
  • getScanner,
  • getTable,
  • getVer,
  • removeScanner,
  • scannerGetList,
  • append,
  • checkAndPut,
  • closeTable

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Path (java.nio.file)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Top Sublime Text 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