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


Java BlockCache.shutdown方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.io.hfile.BlockCache.shutdown方法的典型用法代码示例。如果您正苦于以下问题:Java BlockCache.shutdown方法的具体用法?Java BlockCache.shutdown怎么用?Java BlockCache.shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.io.hfile.BlockCache的用法示例。


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

示例1: main

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * Facility for dumping and compacting catalog tables. Only does catalog tables since these are
 * only tables we for sure know schema on. For usage run:
 * <pre>
 *   ./bin/hbase org.apache.hadoop.hbase.regionserver.HRegion
 * </pre>
 *
 * @throws IOException
 */
public static void main(String[] args) throws IOException {
  if (args.length < 1) {
    printUsageAndExit(null);
  }
  boolean majorCompact = false;
  if (args.length > 1) {
    if (!args[1].toLowerCase().startsWith("major")) {
      printUsageAndExit("ERROR: Unrecognized option <" + args[1] + ">");
    }
    majorCompact = true;
  }
  final Path tableDir = new Path(args[0]);
  final Configuration c = HBaseConfiguration.create();
  final FileSystem fs = FileSystem.get(c);
  final Path logdir = new Path(c.get("hbase.tmp.dir"));
  final String logname = "wal" + FSUtils.getTableName(tableDir) + System.currentTimeMillis();

  final Configuration walConf = new Configuration(c);
  FSUtils.setRootDir(walConf, logdir);
  final WALFactory wals = new WALFactory(walConf, null, logname);
  try {
    processTable(fs, tableDir, wals, c, majorCompact);
  } finally {
    wals.close();
    // TODO: is this still right?
    BlockCache bc = new CacheConfig(c).getBlockCache();
    if (bc != null) bc.shutdown();
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:39,代码来源:HRegion.java

示例2: teardown

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
@After
public void teardown() throws IOException {
  if (region != null) {
    BlockCache bc = region.getStores().get(0).getCacheConfig().getBlockCache();
    ((HRegion)region).close();
    WAL wal = ((HRegion)region).getWAL();
    if (wal != null) wal.close();
    if (bc != null) bc.shutdown();
    region = null;
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:12,代码来源:TestAtomicOperation.java

示例3: main

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * Facility for dumping and compacting catalog tables. Only does catalog tables since these are
 * only tables we for sure know schema on. For usage run:
 * 
 * <pre>
 *   ./bin/hbase org.apache.hadoop.hbase.regionserver.HRegion
 * </pre>
 * @param args
 * @throws IOException
 */
public static void main(String[] args) throws IOException {
  if (args.length < 1) {
    printUsageAndExit(null);
  }
  boolean majorCompact = false;
  if (args.length > 1) {
    if (!args[1].toLowerCase().startsWith("major")) {
      printUsageAndExit("ERROR: Unrecognized option <" + args[1] + ">");
    }
    majorCompact = true;
  }
  final Path tableDir = new Path(args[0]);
  final Configuration c = HBaseConfiguration.create();
  final FileSystem fs = FileSystem.get(c);
  final Path logdir =
      new Path(c.get("hbase.tmp.dir"), "hlog" + tableDir.getName()
          + EnvironmentEdgeManager.currentTimeMillis());
  final Path oldLogDir = new Path(c.get("hbase.tmp.dir"), HConstants.HREGION_OLDLOGDIR_NAME);
  final HLog log = new HLog(fs, logdir, oldLogDir, c);
  try {
    processTable(fs, tableDir, log, c, majorCompact);
  } finally {
    log.close();
    // TODO: is this still right?
    BlockCache bc = new CacheConfig(c).getBlockCache();
    if (bc != null) bc.shutdown();
  }
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:39,代码来源:HRegion.java

示例4: main

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * Facility for dumping and compacting catalog tables.
 * Only does catalog tables since these are only tables we for sure know
 * schema on.  For usage run:
 * <pre>
 *   ./bin/hbase org.apache.hadoop.hbase.regionserver.HRegion
 * </pre>
 *
 * @throws IOException
 */
public static void main(String[] args) throws IOException {
    if (args.length < 1) {
        printUsageAndExit(null);
    }
    boolean majorCompact = false;
    if (args.length > 1) {
        if (!args[1].toLowerCase().startsWith("major")) {
            printUsageAndExit("ERROR: Unrecognized option <" + args[1] + ">");
        }
        majorCompact = true;
    }
    final Path tableDir = new Path(args[0]);
    final Configuration c = HBaseConfiguration.create();
    final FileSystem fs = FileSystem.get(c);
    final Path logdir = new Path(c.get("hbase.tmp.dir"));
    final String logname = "wal" + FSUtils.getTableName(tableDir) + System.currentTimeMillis();

    final Configuration walConf = new Configuration(c);
    FSUtils.setRootDir(walConf, logdir);
    final WALFactory wals = new WALFactory(walConf, null, logname);
    try {
        processTable(fs, tableDir, wals, c, majorCompact);
    } finally {
        wals.close();
        // TODO: is this still right?
        BlockCache bc = new CacheConfig(c).getBlockCache();
        if (bc != null) bc.shutdown();
    }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:40,代码来源:HRegion.java

示例5: main

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * Facility for dumping and compacting catalog tables.
 * Only does catalog tables since these are only tables we for sure know
 * schema on.  For usage run:
 * <pre>
 *   ./bin/hbase org.apache.hadoop.hbase.regionserver.HRegion
 * </pre>
 * @param args
 * @throws IOException
 */
public static void main(String[] args) throws IOException {
  if (args.length < 1) {
    printUsageAndExit(null);
  }
  boolean majorCompact = false;
  if (args.length > 1) {
    if (!args[1].toLowerCase().startsWith("major")) {
      printUsageAndExit("ERROR: Unrecognized option <" + args[1] + ">");
    }
    majorCompact = true;
  }
  final Path tableDir = new Path(args[0]);
  final Configuration c = HBaseConfiguration.create();
  final FileSystem fs = FileSystem.get(c);
  final Path logdir = new Path(c.get("hbase.tmp.dir"));
  final String logname = "hlog" + FSUtils.getTableName(tableDir) + System.currentTimeMillis();

  final HLog log = HLogFactory.createHLog(fs, logdir, logname, c);
  try {
    processTable(fs, tableDir, log, c, majorCompact);
  } finally {
     log.close();
     // TODO: is this still right?
     BlockCache bc = new CacheConfig(c).getBlockCache();
     if (bc != null) bc.shutdown();
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:38,代码来源:HRegion.java

示例6: main

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * Facility for dumping and compacting catalog tables.
 * Only does catalog tables since these are only tables we for sure know
 * schema on.  For usage run:
 * <pre>
 *   ./bin/hbase org.apache.hadoop.hbase.regionserver.HRegion
 * </pre>
 * @param args
 * @throws IOException
 */
public static void main(String[] args) throws IOException {
  if (args.length < 1) {
    printUsageAndExit(null);
  }
  boolean majorCompact = false;
  if (args.length > 1) {
    if (!args[1].toLowerCase().startsWith("major")) {
      printUsageAndExit("ERROR: Unrecognized option <" + args[1] + ">");
    }
    majorCompact = true;
  }
  final Path tableDir = new Path(args[0]);
  final Configuration c = HBaseConfiguration.create();
  final FileSystem fs = FileSystem.get(c);
  final Path logdir = new Path(c.get("hbase.tmp.dir"),
      "hlog" + tableDir.getName()
      + EnvironmentEdgeManager.currentTimeMillis());
  final Path oldLogDir = new Path(c.get("hbase.tmp.dir"),
      HConstants.HREGION_OLDLOGDIR_NAME);
  final HLog log = new HLog(fs, logdir, oldLogDir, c);
  try {
    processTable(fs, tableDir, log, c, majorCompact);
  } finally {
     log.close();
     // TODO: is this still right?
     BlockCache bc = new CacheConfig(c).getBlockCache();
     if (bc != null) bc.shutdown();
  }
}
 
开发者ID:wanhao,项目名称:IRIndex,代码行数:40,代码来源:HRegion.java

示例7: teardown

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
@After
public void teardown() throws IOException {
  if (region != null) {
    BlockCache bc = region.getStores().get(0).getCacheConfig().getBlockCache();
    region.close();
    WAL wal = region.getWAL();
    if (wal != null) wal.close();
    if (bc != null) bc.shutdown();
    region = null;
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:12,代码来源:TestAtomicOperation.java

示例8: main

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * Facility for dumping and compacting catalog tables.
 * Only does catalog tables since these are only tables we for sure know
 * schema on.  For usage run:
 * <pre>
 *   ./bin/hbase org.apache.hadoop.hbase.regionserver.HRegion
 * </pre>
 * @param args
 * @throws IOException
 */
public static void main(String[] args) throws IOException {
  if (args.length < 1) {
    printUsageAndExit(null);
  }
  boolean majorCompact = false;
  if (args.length > 1) {
    if (!args[1].toLowerCase().startsWith("major")) {
      printUsageAndExit("ERROR: Unrecognized option <" + args[1] + ">");
    }
    majorCompact = true;
  }
  final Path tableDir = new Path(args[0]);
  final Configuration c = HBaseConfiguration.create();
  final FileSystem fs = FileSystem.get(c);
  final Path logdir = new Path(c.get("hbase.tmp.dir"),
      "hlog" + tableDir.getName()
      + EnvironmentEdgeManager.currentTimeMillis());
  final Path oldLogDir = new Path(c.get("hbase.tmp.dir"),
      HConstants.HREGION_OLDLOGDIR_NAME);
  final HLog log = new HLog(fs, logdir, oldLogDir, c);
  try {
    processTable(fs, tableDir, log, c, majorCompact);
   } finally {
     log.close();
     // TODO: is this still right?
     BlockCache bc = new CacheConfig(c).getBlockCache();
     if (bc != null) bc.shutdown();
   }
}
 
开发者ID:lifeng5042,项目名称:RStore,代码行数:40,代码来源:HRegion.java

示例9: main

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * Facility for dumping and compacting catalog tables.
 * Only does catalog tables since these are only tables we for sure know
 * schema on.  For usage run:
 * <pre>
 *   ./bin/hbase org.apache.hadoop.hbase.regionserver.HRegion
 * </pre>
 * @param args
 * @throws IOException
 */
public static void main(String[] args) throws IOException {
  if (args.length < 1) {
    printUsageAndExit(null);
  }
  boolean majorCompact = false;
  if (args.length > 1) {
    if (!args[1].toLowerCase().startsWith("major")) {
      printUsageAndExit("ERROR: Unrecognized option <" + args[1] + ">");
    }
    majorCompact = true;
  }
  final Path tableDir = new Path(args[0]);
  final Configuration c = HBaseConfiguration.create();
  final FileSystem fs = FileSystem.get(c);
  final Path logdir = new Path(c.get("hbase.tmp.dir"));
  final String logname = "hlog" + tableDir.getName()
    + EnvironmentEdgeManager.currentTimeMillis();

  final HLog log = HLogFactory.createHLog(fs, logdir, logname, c);
  try {
    processTable(fs, tableDir, log, c, majorCompact);
  } finally {
     log.close();
     // TODO: is this still right?
     BlockCache bc = new CacheConfig(c).getBlockCache();
     if (bc != null) bc.shutdown();
  }
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:39,代码来源:HRegion.java


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