2

I am trying to find an example of how to spin up a Hbase server in a mock or integration style, so I can test my code locally in my IDE. I have tried fake-hbase and hbase testing utility and receive errors especially when trying to start the cluster. Please see below the exception I receive when running the following code:

 hbaseTestUtil = new HBaseTestingUtility(conf)
 hbaseTestUtil.startMiniCluster(3)

the error is as follows:

16/03/14 12:29:00 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\unknown\Documents\trs\target\test-data\780d11ca-27b8-4004-bed8-480bc9903125\dfscluster_d292c05b-0190-43b1-83b2-bebf483c8b3c\dfs\data\data1\current
  getBlockFile()    = C:\Users\unknown\Documents\trs\target\test-data\780d11ca-27b8-4004-bed8-480bc9903125\dfscluster_d292c05b-0190-43b1-83b2-bebf483c8b3c\dfs\data\data1\current\BP-1081755239-10.66.90.86-1457954925705\current\rbw\blk_1073741825
  bytesAcked=7
bytesOnDisk=7 from C:\Users\unknown\Documents\trs\target\test-data\780d11ca-27b8-4004-bed8-480bc9903125\dfscluster_d292c05b-0190-43b1-83b2-bebf483c8b3c\dfs\data\data1\current\BP-1081755239-10.66.90.86-1457954925705\current\rbw\blk_1073741825_1001.meta to C:\Users\unknown\Documents\trs\target\test-data\780d11ca-27b8-4004-bed8-480bc9903125\dfscluster_d292c05b-0190-43b1-83b2-bebf483c8b3c\dfs\data\data1\current\BP-1081755239-10.66.90.86-1457954925705\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.

at org.apache.hadoop.io.nativeio.NativeIO.renameTo0(Native Method)
at org.apache.hadoop.io.nativeio.NativeIO.renameTo(NativeIO.java:830)
at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.moveBlockFiles(FsDatasetImpl.java:613)
... 7 more
16/03/14 12:29:00 INFO datanode.DataNode: Starting CheckDiskError Thread

Has anyone got any examples in scala to do this?

eboni
  • 883
  • 2
  • 10
  • 25
  • I think this is not an HBase issue, but a Windows one. The path is very close to maximum windows path length. It may be failing to create a file. Try reducing the path in some way. – Martin Serrano Mar 14 '16 at 15:49
  • That looks to be it Martin... Thanks! Any idea how I can specify a better base directory to be used with Hbasetestingutility? – eboni Mar 14 '16 at 22:05

0 Answers0