如何将HDInsight的输入/输出路径设置为指向本地存储模拟器中的Azure Storage Vault(ASV)?

时间:2013-08-26 19:37:16

标签: c# azure hdinsight azure-storage-emulator

我正在尝试为hdinsight创建一个简单的map / reducer作业,但我无法通过 ASV://

将本地hdinsight hadoop集群中的作业连接到本地azure存储模拟器

示例代码如下:

var hadoop = Hadoop.Connect();
HadoopJobConfiguration config = new HadoopJobConfiguration();
config.InputPath = @"asv://127.0.0.1:10000/devstoreaccount1/testcontainer/input";
config.OutputFolder = "asv://127.0.0.1:10000/devstoreaccount1/testcontainer/output";
hadoop.MapReduceJob.Execute<Mapper1>(config);

var hadoop = Hadoop.Connect();
HadoopJobConfiguration config = new HadoopJobConfiguration();
config.InputPath = @"asv://testcontainer/input";
config.OutputFolder = "asv://testcontainer/output";
hadoop.MapReduceJob.Execute<Mapper1>(config);

其中 testcontainer 是本地模拟器的blob存储中的现有容器。 运行此代码时,我得到 StreamingException “处理失败('流媒体作业失败!')”

在控制台输出中看到以下错误:

packageJobJar: [] [/C:/Hadoop/hadoop-1.1.0-SNAPSHOT/lib/hadoop-streaming.jar] C: \Users\user1\AppData\Local\Temp\1\streamjob6525516867576872971.jar tmpDir=null 
13/08/26 12:30:51 INFO util.NativeCodeLoader: Loaded the native-hadoop library 
13/08/26 12:30:51 WARN snappy.LoadSnappy: Snappy native library not loaded 
13/08/26 12:30:51 INFO mapred.JobClient: Cleaning up the staging area hdfs://loc alhost:8020/hadoop/hdfs/tmp/mapred/staging/user1/.staging/job_201308221229_0010 
13/08/26 12:30:51 ERROR security.UserGroupInformation: PriviledgedActionExceptio n as:user1 cause:org.apache.hadoop.mapred.InvalidInputException: Input path does  not exist: hdfs:/devstoreaccount1/testcontainer/input 
13/08/26 12:30:51 ERROR streaming.StreamJob: Error Launching job : Input path do es not exist: hdfs:/devstoreaccount1/testcontainer/input 

Streaming Command Failed!

任何提示?

1 个答案:

答案 0 :(得分:0)

您可以使用以下路径之一访问本地存储模拟器。

wasb:// testcontainer @ storageemulator /输入

wasb:/// input(当存储模拟器设置为默认文件系统时)

asv:/// input(当存储模拟器设置为默认文件系统时,asv已过时,不推荐使用)