Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 如何在HbaseTestingUtility中更改HBase base dir_Windows_Scala_Intellij Idea_Hbase_Hbasetestingutility - Fatal编程技术网

Windows 如何在HbaseTestingUtility中更改HBase base dir

Windows 如何在HbaseTestingUtility中更改HBase base dir,windows,scala,intellij-idea,hbase,hbasetestingutility,Windows,Scala,Intellij Idea,Hbase,Hbasetestingutility,我在IntelliJ IDE中运行HBaseteStangulity时遇到问题,我可以看到以下错误可能是由于文件名太长造成的: 16/03/14 22:45:13 WARN datanode.DataNode: IOException in BlockReceiver.run(): java.io.IOException: Failed to move meta file for ReplicaBeingWritten, blk_1073741825_1001, RBW getNumBytes

我在IntelliJ IDE中运行HBaseteStangulity时遇到问题,我可以看到以下错误可能是由于文件名太长造成的:

16/03/14 22:45:13 WARN datanode.DataNode: IOException in BlockReceiver.run(): 
java.io.IOException: Failed to move meta file for ReplicaBeingWritten, blk_1073741825_1001, RBW
getNumBytes()     = 7
getBytesOnDisk()  = 7
getVisibleLength()= 7
getVolume()       = C:\Users\user1\Documents\work\Repos\hadoop-analys\reporting\mrkts-surveillance\target\test-data\9654a646-e923-488a-9e20-46396fd15292\dfscluster_6b264e6b-0218-4f30-ad5b-72e838940b1e\dfs\data\data1\current
getBlockFile()    = C:\Users\user1\Documents\work\Repos\hadoop-analys\reporting\mrkts-surveillance\target\test-data\9654a646-e923-488a-9e20-46396fd15292\dfscluster_6b264e6b-0218-4f30-ad5b-72e838940b1e\dfs\data\data1\current\BP-429386217-192.168.1.110-1457991908038\current\rbw\blk_1073741825
bytesAcked=7
bytesOnDisk=7 from C:\Users\user1\Documents\work\Repos\hadoop-analys\reporting\mrkts-surveillance\target\test-data\9654a646-e923-488a-9e20-46396fd15292\dfscluster_6b264e6b-0218-4f30-ad5b-72e838940b1e\dfs\data\data1\current\BP-429386217-192.168.1.110-1457991908038\current\rbw\blk_1073741825_1001.meta to    C:\Users\user1\Documents\work\Repos\hadoop-analys\reporting\mrkts-surveillance\target\test-data\9654a646-e923-488a-9e20-46396fd15292\dfscluster_6b264e6b-0218-4f30-ad5b-72e838940b1e\dfs\data\data1\current\BP-429386217-192.168.1.110-1457991908038\current\finalized\subdir0\subdir0\blk_1073741825_1001.meta
   at     org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.moveBlockFiles(FsDatasetImpl.java:615)
at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.BlockPoolSlice.addBlock(BlockPoolSlice.java:250)
at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsVolumeImpl.addBlock(FsVolumeImpl.java:229)
at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.finalizeReplica(FsDatasetImpl.java:1119)
at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.finalizeBlock(FsDatasetImpl.java:1100)
at org.apache.hadoop.hdfs.server.datanode.BlockReceiver$PacketResponder.finalizeBlock(BlockReceiver.java:1293)
at org.apache.hadoop.hdfs.server.datanode.BlockReceiver$PacketResponder.run(BlockReceiver.java:1233)
at java.lang.Thread.run(Thread.java:745)
Caused by: 3: The system cannot find the path specified.
知道吗,我如何指定Hbasetestingutility的基本目录以不使用这个庞大的起始目录


谢谢,

您可以使用test.build.data.basedirectory

请查看中的getDataTestDir


基本上,您需要执行以下操作:
System.setProperty(“test.build.data.basedirectory”,“c:/HBase/”@Stanislav建议在我这边也解决了这个问题。
/**
 * System property key to get base test directory value
 */
public static final String BASE_TEST_DIRECTORY_KEY =
  "test.build.data.basedirectory";

/**
  * @return Where to write test data on local filesystem, specific to
  * the test.  Useful for tests that do not use a cluster.
  * Creates it if it does not exist already.
  */
public Path getDataTestDir() {
   if (this.dataTestDir == null) {
     setupDataTestDir();
   }
   return new Path(this.dataTestDir.getAbsolutePath());
 }