org.apache.hadoop.hbase.HBaseTestingUtility.getRandomDir()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.apache.hadoop.hbase.HBaseTestingUtility.getRandomDir()方法的一些代码示例,展示了HBaseTestingUtility.getRandomDir()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBaseTestingUtility.getRandomDir()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.HBaseTestingUtility
类名称:HBaseTestingUtility
方法名:getRandomDir

HBaseTestingUtility.getRandomDir介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

@Before
public void setUp() throws Exception {
 this.restoreDir = TEST_UTIL.getRandomDir();
}

代码示例来源:origin: apache/hbase

String temPath1 = utility1.getRandomDir().toString();
String temPath2 = "/tmp2";

代码示例来源:origin: apache/phoenix

@Before
public void before() throws SQLException, IOException {
 // create table
 Connection conn = DriverManager.getConnection(getUrl());
 tableName = generateUniqueName();
 conn.createStatement().execute(String.format(CREATE_TABLE, tableName));
 conn.commit();
 // configure Phoenix M/R job to read snapshot
 conf = getUtility().getConfiguration();
 job = Job.getInstance(conf);
 tmpDir = getUtility().getRandomDir();
}

代码示例来源:origin: apache/phoenix

private void collectStatsOnSnapshot(Connection conn, String fullTableName,
                  String guidePostWidth, String localPhysicalTableName) throws Exception {
  UpdateStatisticsTool tool = new UpdateStatisticsTool();
  Configuration conf = utility.getConfiguration();
  Admin admin = conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin();
  String snapshotName = "UpdateStatisticsTool_" + generateUniqueName();
  admin.snapshot(snapshotName, TableName.valueOf(localPhysicalTableName));
  LOG.info("Successfully created snapshot " + snapshotName + " for " + localPhysicalTableName);
  Path randomDir = getUtility().getRandomDir();
  if (guidePostWidth != null) {
    conn.createStatement().execute("ALTER TABLE " + fullTableName + " SET GUIDE_POSTS_WIDTH = " + guidePostWidth);
  }
  Job job = tool.configureJob(conf, fullTableName, snapshotName, randomDir);
  assertEquals(job.getConfiguration().get(MAPREDUCE_JOB_TYPE), UPDATE_STATS.name());
  tool.runJob(job, true);
}

代码示例来源:origin: com.aliyun.hbase/alihbase-mapreduce

@Before
public void setUp() throws Exception {
 this.restoreDir = TEST_UTIL.getRandomDir();
}

代码示例来源:origin: org.apache.hbase/hbase-mapreduce

@Before
public void setUp() throws Exception {
 this.restoreDir = TEST_UTIL.getRandomDir();
}

代码示例来源:origin: org.apache.hbase/hbase-mapreduce

String temPath1 = utility1.getRandomDir().toString();
String temPath2 = "/tmp2";

代码示例来源:origin: com.aliyun.hbase/alihbase-mapreduce

String temPath1 = utility1.getRandomDir().toString();
String temPath2 = "/tmp2";

相关文章

HBaseTestingUtility类方法