I am trying to run through the Hadoop connector example in the Programmer's Guide.
When I try to compile the example java program I get all kinds of errors.
Has anyone else tried the example?
Code: Select all
[root@hadoop01]# javac -classpath /opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hadoop-mapreduce/hadoop-mapreduce-client-core.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hadoop/lib/hadoop-vertica.jar -d classes VerticaExample.java && jar -cvf hadoop-vertica-example2.jar -C classes .
VerticaExample.java:14: package org.apache.hadoop.conf does not exist
import org.apache.hadoop.conf.Configuration;
^
VerticaExample.java:15: package org.apache.hadoop.conf does not exist
import org.apache.hadoop.conf.Configured;
^
VerticaExample.java:16: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.DoubleWritable;
^
VerticaExample.java:17: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.LongWritable;
^
VerticaExample.java:18: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.Text;
^
VerticaExample.java:22: package org.apache.hadoop.util does not exist
import org.apache.hadoop.util.Tool;
^
VerticaExample.java:23: package org.apache.hadoop.util does not exist
import org.apache.hadoop.util.ToolRunner;
^
VerticaExample.java:29: cannot find symbol
symbol: class Configured
public class VerticaExample extends Configured implements Tool {
^
VerticaExample.java:29: cannot find symbol
symbol: class Tool
public class VerticaExample extends Configured implements Tool {
^
VerticaExample.java:31: cannot find symbol
symbol : class LongWritable
location: class com.vertica.hadoop.VerticaExample
Mapper < LongWritable, VerticaRecord, Text, DoubleWritable > {
^
VerticaExample.java:31: cannot find symbol
symbol : class Text
location: class com.vertica.hadoop.VerticaExample
Mapper < LongWritable, VerticaRecord, Text, DoubleWritable > {
^
VerticaExample.java:31: cannot find symbol
symbol : class DoubleWritable
location: class com.vertica.hadoop.VerticaExample
Mapper < LongWritable, VerticaRecord, Text, DoubleWritable > {
^
VerticaExample.java:33: cannot find symbol
symbol : class LongWritable
location: class com.vertica.hadoop.VerticaExample.Map
public void map(LongWritable key, VerticaRecord value, Context context)
^
VerticaExample.java:45: cannot find symbol
symbol : class Text
location: class com.vertica.hadoop.VerticaExample
Reducer < Text, DoubleWritable, Text, VerticaRecord > {
^
VerticaExample.java:45: cannot find symbol
symbol : class DoubleWritable
location: class com.vertica.hadoop.VerticaExample
Reducer < Text, DoubleWritable, Text, VerticaRecord > {
^
VerticaExample.java:45: cannot find symbol
symbol : class Text
location: class com.vertica.hadoop.VerticaExample
Reducer < Text, DoubleWritable, Text, VerticaRecord > {
^
VerticaExample.java:62: cannot find symbol
symbol : class Text
location: class com.vertica.hadoop.VerticaExample.Reduce
public void reduce(Text key, Iterable < DoubleWritable > values,
^
VerticaExample.java:62: cannot find symbol
symbol : class DoubleWritable
location: class com.vertica.hadoop.VerticaExample.Reduce
public void reduce(Text key, Iterable < DoubleWritable > values,
^
VerticaExample.java:39: cannot find symbol
symbol : class Text
location: class com.vertica.hadoop.VerticaExample.Map
context.write(new Text((String) value.get(3)),
^
VerticaExample.java:40: cannot find symbol
symbol : class DoubleWritable
location: class com.vertica.hadoop.VerticaExample.Map
new DoubleWritable((Long) value.get(0)));
^
VerticaExample.java:39: cannot access org.apache.hadoop.util.Progressable
class file for org.apache.hadoop.util.Progressable not found
context.write(new Text((String) value.get(3)),
^
VerticaExample.java:56: cannot access org.apache.hadoop.conf.Configuration
class file for org.apache.hadoop.conf.Configuration not found
record = new VerticaRecord(context.getConfiguration());
^
VerticaExample.java:125: cannot find symbol
symbol : class Text
location: class com.vertica.hadoop.VerticaExample.Reduce
context.write(new Text("mrtarget"), record);
^
VerticaExample.java:131: cannot find symbol
symbol : class Configuration
location: class com.vertica.hadoop.VerticaExample
Configuration conf = getConf();
^
VerticaExample.java:131: cannot find symbol
symbol : method getConf()
location: class com.vertica.hadoop.VerticaExample
Configuration conf = getConf();
^
VerticaExample.java:143: cannot find symbol
symbol : class Text
location: class com.vertica.hadoop.VerticaExample
job.setMapOutputKeyClass(Text.class);
^
VerticaExample.java:144: cannot find symbol
symbol : class DoubleWritable
location: class com.vertica.hadoop.VerticaExample
job.setMapOutputValueClass(DoubleWritable.class);
^
VerticaExample.java:148: cannot find symbol
symbol : class Text
location: class com.vertica.hadoop.VerticaExample
job.setOutputKeyClass(Text.class);
^
VerticaExample.java:127: method does not override or implement a method from a supertype
}@
^
VerticaExample.java:167: cannot find symbol
symbol : class Configuration
location: class com.vertica.hadoop.VerticaExample
int res = ToolRunner.run(new Configuration(), new VerticaExample(),
^
VerticaExample.java:167: cannot find symbol
symbol : variable ToolRunner
location: class com.vertica.hadoop.VerticaExample
int res = ToolRunner.run(new Configuration(), new VerticaExample(),
^
Note: VerticaExample.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
31 errors