Examples of MetaScannerVisitor


Examples of com.alibaba.wasp.meta.FMetaScanner.MetaScannerVisitor

  public FetchEntityGroupSizeResponse fetchEntityGroupSize(
      RpcController controller, FetchEntityGroupSizeRequest request)
      throws ServiceException {
    final byte[] tableNameBytes = request.getTableName().toByteArray();
    final AtomicInteger actualEgCount = new AtomicInteger(0);
    MetaScannerVisitor visitor = new MetaScannerVisitorBase() {
      @Override
      public boolean processRow(org.apache.hadoop.hbase.client.Result rowResult)
          throws IOException {
        EntityGroupInfo info = EntityGroupInfo.getEntityGroupInfo(rowResult);
        if (info == null) {
View Full Code Here

Examples of com.alibaba.wasp.meta.FMetaScanner.MetaScannerVisitor

  public Pair<EntityGroupInfo, ServerName> getTableEntityGroupForRow(
      final byte[] tableName, final byte[] rowKey) throws IOException {
    final AtomicReference<Pair<EntityGroupInfo, ServerName>> result = new AtomicReference<Pair<EntityGroupInfo, ServerName>>(
        null);

    MetaScannerVisitor visitor = new MetaScannerVisitorBase() {
      @Override
      public boolean processRow(Result data) throws IOException {
        if (data == null || data.size() <= 0) {
          return true;
        }
View Full Code Here

Examples of com.alibaba.wasp.meta.FMetaScanner.MetaScannerVisitor

      pair = FMetaReader.getEntityGroup(conf, tableNameOrEntityGroupName);
      if (pair == null) {
        final AtomicReference<Pair<EntityGroupInfo, ServerName>> result = new AtomicReference<Pair<EntityGroupInfo, ServerName>>(
            null);
        final String encodedName = Bytes.toString(tableNameOrEntityGroupName);
        MetaScannerVisitor visitor = new MetaScannerVisitorBase() {
          @Override
          public boolean processRow(org.apache.hadoop.hbase.client.Result data)
              throws IOException {
            EntityGroupInfo info = EntityGroupInfo.getEntityGroupInfo(data);
            if (info == null) {
View Full Code Here

Examples of com.alibaba.wasp.meta.FMetaScanner.MetaScannerVisitor

   * @throws java.io.IOException
   *           When reading the rows fails.
   */
  public List<byte[]> getMetaTableRows(byte[] tableName) throws IOException {
    final List<byte[]> rows = new ArrayList<byte[]>();
    MetaScannerVisitor visitor = new BlockingMetaScannerVisitor(conf) {
      @Override
      public boolean processRowInternal(Result result) throws IOException {
        if (result == null || result.isEmpty()) {
          return true;
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor

    for (int tries = 0; tries < this.numRetries * this.retryLongerMultiplier;
      ++tries) {
      if (!doneWithMetaScan) {
        // Wait for new table to come on-line
        final AtomicInteger actualRegCount = new AtomicInteger(0);
        MetaScannerVisitor visitor = new MetaScannerVisitorBase() {
          @Override
          public boolean processRow(Result rowResult) throws IOException {
            if (rowResult == null || rowResult.size() <= 0) {
              return true;
            }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor

    Pair<HRegionInfo, ServerName> pair = MetaReader.getRegion(ct, tableNameOrRegionName);
    if (pair == null) {
      final AtomicReference<Pair<HRegionInfo, ServerName>> result =
        new AtomicReference<Pair<HRegionInfo, ServerName>>(null);
      final String encodedName = Bytes.toString(tableNameOrRegionName);
      MetaScannerVisitor visitor = new MetaScannerVisitorBase() {
        @Override
        public boolean processRow(Result data) throws IOException {
          if (data == null || data.size() <= 0) {
            return true;
          }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor

      // Will remove later if we can fix it
      errors.reportError("Fatal error: unable to get root region location. Exiting...");
      return false;
    }

    MetaScannerVisitor visitor = new MetaScannerVisitorBase() {
      int countRecord = 1;

      // comparator to sort KeyValues with latest modtime
      final Comparator<KeyValue> comp = new Comparator<KeyValue>() {
        public int compare(KeyValue k1, KeyValue k2) {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor

      final byte [] tableName, final byte [] rowKey)
  throws IOException {
    final AtomicReference<Pair<HRegionInfo, ServerName>> result =
      new AtomicReference<Pair<HRegionInfo, ServerName>>(null);

    MetaScannerVisitor visitor =
      new MetaScannerVisitorBase() {
        @Override
        public boolean processRow(Result data) throws IOException {
          if (data == null || data.size() <= 0) {
            return true;
View Full Code Here

Examples of org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor

    int prevRegCount = 0;
    for (int tries = 0; tries < this.numRetries * this.retryLongerMultiplier;
      ++tries) {
      // Wait for new table to come on-line
      final AtomicInteger actualRegCount = new AtomicInteger(0);
      MetaScannerVisitor visitor = new MetaScannerVisitorBase() {
        @Override
        public boolean processRow(Result rowResult) throws IOException {
          HRegionInfo info = Writables.getHRegionInfoOrNull(
              rowResult.getValue(HConstants.CATALOG_FAMILY,
                  HConstants.REGIONINFO_QUALIFIER));
View Full Code Here

Examples of org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor

      // Will remove later if we can fix it
      errors.reportError("Fatal error: unable to get root region location. Exiting...");
      return false;
    }

    MetaScannerVisitor visitor = new MetaScannerVisitorBase() {
      int countRecord = 1;

      // comparator to sort KeyValues with latest modtime
      final Comparator<KeyValue> comp = new Comparator<KeyValue>() {
        public int compare(KeyValue k1, KeyValue k2) {
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.