org.apache.hadoop.mapred.LocalClientProtocolProvider not found
Asked Answered
C

1

5

I wrote a program to execute a embeded Pig sentence in Java. I executed the java sentence registryQuery. But when I try on to store the result, I give a error of org.apache.hadoop.mapred.localClientProtocolProvider not found. I don't understand this error.

Attached are the sentences:

This is the java code

 pigServer.registerQuery("source = load '"+ inputFile + "' USING    org.apache.pig.backend.hadoop.hbase.HBaseStorage( " +
"'datos:bikes', '-loadKey true')"+
"as (id1:int, bikes:int) ;");

Path output = new Path("consulta1");

 pigServer.store("source","consulta1");

This is the java Exception:

14/06/07 04:01:27 INFO pigstats.ScriptState: Pig features used in the script: UNKNOWN
14/06/07 04:01:27 WARN conf.Configuration: mapred.textoutputformat.separator is deprecated. Instead, use mapreduce.output.textoutputformat.separator
14/06/07 04:01:27 INFO mapReduceLayer.MRCompiler: File concatenation threshold: 100 optimistic? false
14/06/07 04:01:27 INFO mapReduceLayer.MultiQueryOptimizer: MR plan size before optimization: 1
14/06/07 04:01:27 INFO mapReduceLayer.MultiQueryOptimizer: MR plan size after optimization: 1
Exception in thread "main" java.util.ServiceConfigurationError: 
    org.apache.hadoop.mapreduce.protocol.ClientProtocolProvider: Provider  
    org.apache.hadoop.mapred.LocalClientProtocolProvider not found
at java.util.ServiceLoader.fail(ServiceLoader.java:214)
at java.util.ServiceLoader.access$400(ServiceLoader.java:164)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:350)
at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:90)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:83)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:76)
at org.apache.hadoop.mapred.JobClient.init(JobClient.java:478)
at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:457)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:152)
at org.apache.pig.PigServer.launchPlan(PigServer.java:1266)
at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1251)
at org.apache.pig.PigServer.storeEx(PigServer.java:933)
at org.apache.pig.PigServer.store(PigServer.java:900)
at org.apache.pig.PigServer.store(PigServer.java:868)
at bicing.pig.PigEstadisticas.runMyQuery(PigEstadisticas.java:97)
at bicing.pig.PigEstadisticas.main(PigEstadisticas.java:45)

What is org.apache.hadoop.mapred.LocalClientProtocolProvider?

Could somebody help me?

Compost answered 7/6, 2014 at 11:48 Comment(0)
M
8

It's an old question, but since this could help someone else, I am answering it.

Cause of this problem is that the class

org.apache.hadoop.mapred.LocalClientProtocolProvider

is not found in your class-path. I resolved this error in my setup by adding below maven dependency.

<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-mapreduce-client-common</artifactId>
    <version>2.4.1</version>
</dependency>

As far as the functionality of this class is concerned, I do not have more information as of now, as I myself am learning hadoop and Pig.

Mansuetude answered 6/10, 2014 at 7:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.