in Education by
An unhandled exception of type System.AggregateException occurred in mscorlib.dll Inner Exception: {"Response status code does not indicate success: 403 (Forbidden)."} sometime get: {"Response status code does not indicate success: 401 (Credentials required)."} All the logins are correct. Hadoop.Connect() connect properly. Stack trace: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Microsoft.Hadoop.WebClient.WebHCatClient.WebHcatMapReduceStreamingExecutor.Execute(Boolean throwOnError) at Microsoft.Hadoop.MapReduce.Execution.Hadoop.StreamingJobExecutorBase.ExecuteCore(Type mapper, Type reducer, Type combiner, HadoopJobConfiguration config) at Microsoft.Hadoop.MapReduce.Execution.Hadoop.StreamingJobExecutorBase.Execute(Type mapperType, Type reducerType, Type combinerType, HadoopJobConfiguration config) at Microsoft.Hadoop.MapReduce.Execution.Hadoop.StreamingJobExecutorBase.Execute[TMapper,TReducer](HadoopJobConfiguration config) at Pwc.Demo.HDPClient.Program.Main(String[] args) in C:\ASC Project Info\TalentExchange\Demo project\Pwc.Demo.HDPClient\Pwc.Demo.HDPClient\Program.cs:line 49 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() class Program { static void Main(string[] args) { HadoopJobConfiguration myConfig = new HadoopJobConfiguration(); myConfig.InputPath = "asv://hdsto-something-.net/data/in/reviews.txt"; myConfig.OutputFolder = "asv://hd-something-.blob.core.windows.net/data/out/"; Environment.SetEnvironmentVariable("HADOOP_HOME", @"C:\apps\dist\hadoop-2.7.1.2.3.3.1-25\bin"); Environment.SetEnvironmentVariable("JAVA_HOME", @"C:\Program Files\Java\jre1.8.0_101\bin\javaw.exe"); Uri azureCluster = new Uri("https://somename--Demo.azurehdinsight.net"); string clusterUserName = "***"; string clusterPassword = "****"; // This is the name of the account under which Hadoop will execute jobs. // Normally this is just "Hadoop". string hadoopUserName = "Hadoop"; // Azure Storage Information. string azureStorageAccount = "somestore.blob.core.windows.net"; string azureStorageKey = "***=="; string azureStorageContainer = "**"; bool createContinerIfNotExist = false; IHadoop myCluster = Hadoop.Connect(azureCluster, clusterUserName, hadoopUserName, clusterPassword, azureStorageAccount, azureStorageKey, azureStorageContainer, createContinerIfNotExist); //execute mapreduce job MapReduceResult jobResult = myCluster.MapReduceJob.Execute(myConfig); int exitCode = jobResult.Info.ExitCode; string exitStatus = "Failure"; if (exitCode == 0) exitStatus = "Success"; exitStatus = exitCode + " (" + exitStatus + ")"; Console.WriteLine(); Console.Write("Exit Code = " + exitStatus); Console.Read(); } } public class MySimpleMapper : MapperBase { public override void Map(string inputLine, MapperContext context) { int value = int.Parse(inputLine); string key = (value % 2 == 0) ? "even" : "odd"; context.EmitKeyValue(key, value.ToString()); } } public class MySimpleReducer : ReducerCombinerBase { public override void Reduce(string key, IEnumerable values, ReducerCombinerContext context) { //initialize counters int myCount = 0; int mySum = 0; //count and sum incoming values foreach (string value in values) { mySum += int.Parse(value); myCount++; } context.EmitKeyValue(key, myCount + "t" + mySum); } } Error snapshot: JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Your input path should not be to a specific file, but a directory. That directory should only contain files and not folders. myConfig.InputPath = "asv://hdsto-something-.net/data/in/";

Related questions

0 votes
    What does the status code 500 indicate? (a) Error in request (b) Error in response (c) Error in ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    What does the status code 200 indicate? (a) Error in request (b) Error in response (c) Error in ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    What HTTP Status Code 401 states in RESTful?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    I have nginx installed with PHP-FPM on a CentOS 5 box, but am struggling to get it to serve any ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 25, 2022 in Education by JackTerrance
0 votes
    I'm trying to set up an Amazon Linux AMI(ami-f0091d91) and have a script that runs a copy command to copy ... what is going on? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I am trying develop first app in ionic and with codeigniter backend but facing Response for preflight has ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 5, 2022 in Education by JackTerrance
0 votes
    What does the status code 302 represent? 1. User can select among multiple links and go to different page. 2. ... available only by means of proxy address given in the response....
asked Jun 26, 2021 in Technology by JackTerrance
0 votes
    Which factors are required for the success of democracy in India? Please answer the above question....
asked Aug 13, 2022 in Education by JackTerrance
0 votes
0 votes
    I need to change the credentials of an already existing Windows service using C#. I am aware of two ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    I need to change the credentials of an already existing Windows service using C#. I am aware of two ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    i have an array of objects in [ { "country": "USA", "payment": [ { "paymentType": "Visa" ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 6, 2022 in Education by JackTerrance
0 votes
    Suppose you have designed a Big Data batch using the MapReduce framework. Now you want to execute it on a cluster ... Run view? Name Node Data Node Resource Manager Job Tracker...
asked Mar 23, 2021 in Technology by JackTerrance
0 votes
    I'm experiencing some problems regarding Twitter OAuth within an android activity. I read a lot of tutorials ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    How can you reduce the number of SSH connections required? (i)forks (ii)pipelining (iii)accelerate_port (iv)become_method...
asked Jan 25, 2023 in Technology by JackTerrance
...