Examples of openScanner()


Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

      try {

        Scan scan = MetaReader.getScanForTableName(tableName);
        scan.addColumn(HConstants.CATALOG_FAMILY,
            HConstants.REGIONINFO_QUALIFIER);
        scannerId = server.openScanner(
          firstMetaServer.getRegionInfo().getRegionName(), scan);
        // Get a batch at a time.
        Result values = server.next(scannerId);

        // let us wait until .META. table is updated and
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

    // created. Throw already-exists exception.
    MetaRegion m = regionManager.getFirstMetaRegionForRegion(newRegion);
       
    byte [] metaRegionName = m.getRegionName();
    HRegionInterface srvr = connection.getHRegionConnection(m.getServer());
    long scannerid = srvr.openScanner(metaRegionName, COL_REGIONINFO_ARRAY,
      tableName, LATEST_TIMESTAMP, null);
    try {
      RowResult data = srvr.next(scannerid);
      if (data != null && data.size() > 0) {
        HRegionInfo info = Writables.getHRegionInfo(data.get(COL_REGIONINFO));
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

    Set<MetaRegion> regions = regionManager.getMetaRegionsForTable(tableName);
    for (MetaRegion m: regions) {
      byte [] metaRegionName = m.getRegionName();
      HRegionInterface srvr = connection.getHRegionConnection(m.getServer());
      long scannerid =
        srvr.openScanner(metaRegionName,
          new byte[][] {COL_REGIONINFO, COL_SERVER},
          tableName,
          LATEST_TIMESTAMP,
          null);
      try {
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

    Set<MetaRegion> regions = regionManager.getMetaRegionsForTable(tableName);
    for (MetaRegion m: regions) {
      byte [] metaRegionName = m.getRegionName();
      HRegionInterface srvr = connection.getHRegionConnection(m.getServer());
      long scannerid =
          srvr.openScanner(metaRegionName,
            new byte[][] {COL_REGIONINFO, COL_SERVER},
            tableName,
            LATEST_TIMESTAMP,
            null);
      try {
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

      new HashMap<HRegionInfo, RowResult>();
    List<byte []> emptyRows = new ArrayList<byte []>();
    int rows = 0;
    try {
      regionServer = master.connection.getHRegionConnection(region.getServer());
      scannerId = regionServer.openScanner(region.getRegionName(),
        COLUMN_FAMILY_ARRAY, EMPTY_START_ROW, HConstants.LATEST_TIMESTAMP, null);
      while (true) {
        RowResult values = regionServer.next(scannerId);
        if (values == null || values.size() == 0) {
          break;
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

    HRegionInfo info = new HRegionInfo();
    for (int tries = 0; tries < numRetries; tries++) {
      long scannerId = -1L;
      try {
        scannerId =
          server.openScanner(firstMetaServer.getRegionInfo().getRegionName(),
            HConstants.COL_REGIONINFO_ARRAY, tableName,
            HConstants.LATEST_TIMESTAMP, null);
        RowResult values = server.next(scannerId);
        if (values == null || values.size() == 0) {
          break;
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

    byte [] metaRegionName = m.getRegionName();
    HRegionInterface srvr = connection.getHRegionConnection(m.getServer());
    byte[] firstRowInTable = Bytes.toBytes(tableName + ",,");
    Scan scan = new Scan(firstRowInTable);
    scan.addColumn(CATALOG_FAMILY, REGIONINFO_QUALIFIER);
    long scannerid = srvr.openScanner(metaRegionName, scan);
    try {
      Result data = srvr.next(scannerid);
      if (data != null && data.size() > 0) {
        HRegionInfo info = Writables.getHRegionInfo(
            data.getValue(CATALOG_FAMILY, REGIONINFO_QUALIFIER));
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

      byte [] metaRegionName = m.getRegionName();
      HRegionInterface srvr = connection.getHRegionConnection(m.getServer());
      Scan scan = new Scan(firstRowInTable);
      scan.addColumn(CATALOG_FAMILY, REGIONINFO_QUALIFIER);
      scan.addColumn(CATALOG_FAMILY, SERVER_QUALIFIER);
      long scannerid = srvr.openScanner(metaRegionName, scan);
      try {
        while (true) {
          Result data = srvr.next(scannerid);
          if (data == null || data.size() <= 0)
            break;
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

      byte [] metaRegionName = m.getRegionName();
      HRegionInterface srvr = connection.getHRegionConnection(m.getServer());
      Scan scan = new Scan(firstRowInTable);
      scan.addColumn(CATALOG_FAMILY, REGIONINFO_QUALIFIER);
      scan.addColumn(CATALOG_FAMILY, SERVER_QUALIFIER);
      long scannerid = srvr.openScanner(metaRegionName, scan);
      try {
        while (true) {
          Result data = srvr.next(scannerid);
          if (data == null || data.size() <= 0)
            break;
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.openScanner()

    HRegionInfo info = new HRegionInfo();
    for (int tries = 0; tries < numRetries; tries++) {
      long scannerId = -1L;
      try {
        scannerId =
          server.openScanner(firstMetaServer.getRegionInfo().getRegionName(),
            HConstants.COL_REGIONINFO_ARRAY, tableName,
            HConstants.LATEST_TIMESTAMP, null);
        RowResult values = server.next(scannerId);
        if (values == null || values.size() == 0) {
          break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.