当前位置: 首页>>代码示例>>Java>>正文


Java RemoteExceptionHandler类代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.RemoteExceptionHandler的典型用法代码示例。如果您正苦于以下问题:Java RemoteExceptionHandler类的具体用法?Java RemoteExceptionHandler怎么用?Java RemoteExceptionHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RemoteExceptionHandler类属于org.apache.hadoop.hbase包,在下文中一共展示了RemoteExceptionHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processWorkItems

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private void processWorkItems(String key, List<Pair<HRegionLocation, Entry>> actions)
    throws IOException {
  RegionServerWriter rsw = null;

  long startTime = System.nanoTime();
  try {
    rsw = getRegionServerWriter(key);
    rsw.sink.replayEntries(actions);

    // Pass along summary statistics
    rsw.incrementEdits(actions.size());
    rsw.incrementNanoTime(System.nanoTime() - startTime);
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.fatal(" Got while writing log entry to log", e);
    throw e;
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:19,代码来源:WALSplitter.java

示例2: bootstrap

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private static void bootstrap(final Path rd, final Configuration c)
throws IOException {
  LOG.info("BOOTSTRAP: creating hbase:meta region");
  try {
    // Bootstrapping, make sure blockcache is off.  Else, one will be
    // created here in bootstrap and it'll need to be cleaned up.  Better to
    // not make it in first place.  Turn off block caching for bootstrap.
    // Enable after.
    HRegionInfo metaHRI = new HRegionInfo(HRegionInfo.FIRST_META_REGIONINFO);
    HTableDescriptor metaDescriptor = new FSTableDescriptors(c).get(TableName.META_TABLE_NAME);
    setInfoFamilyCachingForMeta(metaDescriptor, false);
    HRegion meta = HRegion.createHRegion(metaHRI, rd, c, metaDescriptor, null, true, true);
    setInfoFamilyCachingForMeta(metaDescriptor, true);
    HRegion.closeHRegion(meta);
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.error("bootstrap", e);
    throw e;
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:21,代码来源:MasterFileSystem.java

示例3: nextRegion

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private HRegionInfo nextRegion() throws IOException {
  try {
    Result results = getMetaRow();
    if (results == null) {
      return null;
    }
    HRegionInfo region = HRegionInfo.getHRegionInfo(results);
    if (region == null) {
      throw new NoSuchElementException("meta region entry missing " +
          Bytes.toString(HConstants.CATALOG_FAMILY) + ":" +
          Bytes.toString(HConstants.REGIONINFO_QUALIFIER));
    }
    if (!region.getTable().equals(this.tableName)) {
      return null;
    }
    return region;
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.error("meta scanner error", e);
    metaScanner.close();
    throw e;
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:24,代码来源:HMerge.java

示例4: cleanup

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private Throwable cleanup(final Throwable t, final String msg) {
  // Don't log as error if NSRE; NSRE is 'normal' operation.
  if (t instanceof NotServingRegionException) {
    LOG.debug("NotServingRegionException; " + t.getMessage());
    return t;
  }
  if (msg == null) {
    LOG.error("", RemoteExceptionHandler.checkThrowable(t));
  } else {
    LOG.error(msg, RemoteExceptionHandler.checkThrowable(t));
  }
  if (!rpcServices.checkOOME(t)) {
    checkFileSystem();
  }
  return t;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:17,代码来源:HRegionServer.java

示例5: nextRegion

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private HRegionInfo nextRegion() throws IOException {
  try {
    Result results = getMetaRow();
    if (results == null) {
      return null;
    }
    byte[] regionInfoValue = results.getValue(HConstants.CATALOG_FAMILY,
        HConstants.REGIONINFO_QUALIFIER);
    if (regionInfoValue == null || regionInfoValue.length == 0) {
      throw new NoSuchElementException("meta region entry missing " +
          Bytes.toString(HConstants.CATALOG_FAMILY) + ":" +
          Bytes.toString(HConstants.REGIONINFO_QUALIFIER));
    }
    HRegionInfo region = Writables.getHRegionInfo(regionInfoValue);
    if (!Bytes.equals(region.getTableName(), this.tableName)) {
      return null;
    }
    return region;
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.error("meta scanner error", e);
    metaScanner.close();
    throw e;
  }
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:26,代码来源:HMerge.java

示例6: cleanup

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private Throwable cleanup(final Throwable t, final String msg) {
  // Don't log as error if NSRE; NSRE is 'normal' operation.
  if (t instanceof NotServingRegionException) {
    LOG.debug("NotServingRegionException; " + t.getMessage());
    return t;
  }
  if (msg == null) {
    LOG.error("", RemoteExceptionHandler.checkThrowable(t));
  } else {
    LOG.error(msg, RemoteExceptionHandler.checkThrowable(t));
  }
  if (!checkOOME(t)) {
    checkFileSystem();
  }
  return t;
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:17,代码来源:HRegionServer.java

示例7: bootstrap

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private static void bootstrap(final Path rd, final Configuration c)
throws IOException {
  LOG.info("BOOTSTRAP: creating hbase:meta region");
  try {
    // Bootstrapping, make sure blockcache is off.  Else, one will be
    // created here in bootstrap and it'll need to be cleaned up.  Better to
    // not make it in first place.  Turn off block caching for bootstrap.
    // Enable after.
    HRegionInfo metaHRI = new HRegionInfo(HRegionInfo.FIRST_META_REGIONINFO);
    HTableDescriptor metaDescriptor = new FSTableDescriptors(c).get(TableName.META_TABLE_NAME);
    setInfoFamilyCachingForMeta(metaDescriptor, false);
    HRegion meta = HRegion.createHRegion(metaHRI, rd, c, metaDescriptor);
    setInfoFamilyCachingForMeta(metaDescriptor, true);
    HRegion.closeHRegion(meta);
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.error("bootstrap", e);
    throw e;
  }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:21,代码来源:MasterFileSystem.java

示例8: cleanup

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private Throwable cleanup(final Throwable t, final String msg) {
    // Don't log as error if NSRE; NSRE is 'normal' operation.
    if (t instanceof NotServingRegionException) {
        LOG.debug("NotServingRegionException; " + t.getMessage());
        return t;
    }
    if (msg == null) {
        LOG.error("", RemoteExceptionHandler.checkThrowable(t));
    } else {
        LOG.error(msg, RemoteExceptionHandler.checkThrowable(t));
    }
    if (!rpcServices.checkOOME(t)) {
        checkFileSystem();
    }
    return t;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:17,代码来源:HRegionServer.java

示例9: bootstrap

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private static void bootstrap(final Path rd, final Configuration c)
throws IOException {
  LOG.info("BOOTSTRAP: creating hbase:meta region");
  try {
    // Bootstrapping, make sure blockcache is off.  Else, one will be
    // created here in bootstrap and it'll need to be cleaned up.  Better to
    // not make it in first place.  Turn off block caching for bootstrap.
    // Enable after.
    HRegionInfo metaHRI = new HRegionInfo(HRegionInfo.FIRST_META_REGIONINFO);
    setInfoFamilyCachingForMeta(false);
    HRegion meta = HRegion.createHRegion(metaHRI, rd, c,
        HTableDescriptor.META_TABLEDESC);
    setInfoFamilyCachingForMeta(true);
    HRegion.closeHRegion(meta);
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.error("bootstrap", e);
    throw e;
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:21,代码来源:MasterFileSystem.java

示例10: cleanup

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
protected Throwable cleanup(final Throwable t, final String msg) {
  // Don't log as error if NSRE; NSRE is 'normal' operation.
  if (t instanceof NotServingRegionException) {
    LOG.debug("NotServingRegionException; " + t.getMessage());
    return t;
  }
  if (msg == null) {
    LOG.error("", RemoteExceptionHandler.checkThrowable(t));
  } else {
    LOG.error(msg, RemoteExceptionHandler.checkThrowable(t));
  }
  if (!checkOOME(t)) {
    checkFileSystem();
  }
  return t;
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:17,代码来源:HRegionServer.java

示例11: processWorkItems

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private void processWorkItems(String key, List<Pair<HRegionLocation, HLog.Entry>> actions)
    throws IOException {
  RegionServerWriter rsw = null;

  long startTime = System.nanoTime();
  try {
    rsw = getRegionServerWriter(key);
    rsw.sink.replayEntries(actions);

    // Pass along summary statistics
    rsw.incrementEdits(actions.size());
    rsw.incrementNanoTime(System.nanoTime() - startTime);
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.fatal(" Got while writing log entry to log", e);
    throw e;
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:19,代码来源:HLogSplitter.java

示例12: cleanup

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private Throwable cleanup(final Throwable t, final String msg) {
  // Don't log as error if NSRE; NSRE is 'normal' operation.
  if (t instanceof NotServingRegionException) {
    LOG.debug("NotServingRegionException; " +  t.getMessage());
    return t;
  }
  if (msg == null) {
    LOG.error("", RemoteExceptionHandler.checkThrowable(t));
  } else {
    LOG.error(msg, RemoteExceptionHandler.checkThrowable(t));
  }
  if (!checkOOME(t)) {
    checkFileSystem();
  }
  return t;
}
 
开发者ID:wanhao,项目名称:IRIndex,代码行数:17,代码来源:HRegionServer.java

示例13: nextRegion

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private HRegionInfo nextRegion() throws IOException {
  try {
    Result results = getMetaRow();
    if (results == null) {
      return null;
    }
    HRegionInfo region = HRegionInfo.getHRegionInfo(results);
    if (region == null) {
      throw new NoSuchElementException("meta region entry missing " +
          Bytes.toString(HConstants.CATALOG_FAMILY) + ":" +
          Bytes.toString(HConstants.REGIONINFO_QUALIFIER));
    }
    if (!Bytes.equals(region.getTableName(), this.tableName)) {
      return null;
    }
    return region;
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.error("meta scanner error", e);
    metaScanner.close();
    throw e;
  }
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:24,代码来源:HMerge.java

示例14: closeWAL

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
private void closeWAL(final boolean delete) {
  try {
    if (this.hlogForMeta != null) {
      //All hlogs (meta and non-meta) are in the same directory. Don't call 
      //closeAndDelete here since that would delete all hlogs not just the 
      //meta ones. We will just 'close' the hlog for meta here, and leave
      //the directory cleanup to the follow-on closeAndDelete call.
      this.hlogForMeta.close();
    }
    if (this.hlog != null) {
      if (delete) {
        hlog.closeAndDelete();
      } else {
        hlog.close();
      }
    }
  } catch (Throwable e) {
    LOG.error("Close and delete failed", RemoteExceptionHandler.checkThrowable(e));
  }
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:21,代码来源:HRegionServer.java

示例15: chore

import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入依赖的package包/类
@Override
protected void chore() {
  try {
    FileStatus[] files = FSUtils.listStatus(this.fs, this.oldFileDir);
    checkAndDeleteEntries(files);
  } catch (IOException e) {
    e = RemoteExceptionHandler.checkIOException(e);
    LOG.warn("Error while cleaning the logs", e);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:11,代码来源:CleanerChore.java


注:本文中的org.apache.hadoop.hbase.RemoteExceptionHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。