나는이 문제에 대해 큰 도움을 주실 것입니다.mapreduce.LoadIncrementalHFiles :: HBase에 HFiles를로드 할 수 없습니다.
HBase 대량로드 API를 사용하여 맵 축소 작업의 출력을 HBase 테이블에 삽입하려고합니다. LoadIncrementalHFiles.doBulkLoad (new Path(), hTable);
내 맵퍼에서 KeyValue 데이터 형식을 내 보낸 다음 기본 리듀서를 사용하여 HFile을 준비하기 위해 HFileOutputFormat을 사용하고 있습니다.
map-reduce 작업을 실행하면 오류없이 완료되고 출력 파일이 만들어 지지만 HBase에 HFiles를 삽입하는 마지막 단계는 일어나지 않습니다.
13/09/08 03:39:51 WARN mapreduce.LoadIncrementalHFiles: Skipping non-directory hdfs://localhost:54310/user/xx.xx/output/_SUCCESS
13/09/08 03:39:51 WARN mapreduce.LoadIncrementalHFiles: Bulk load operation did not find any files to load in directory output/. Does it contain files in subdirectories that correspond to column family names?
하지만 출력 디렉토리가 포함 볼 수 있습니다 : 내지도-감소 완료 후 아래의 오류가
1. _SUCCESS
2. _logs
3. _0/2aa96255f7f5446a8ea7f82aa2bd299e file (which contains my data)
내가 왜 내 bulkloader가에서 파일을 따기하지 않습니다에 관한 단서가 없다 출력 디렉토리.
public static void main(String[] args) throws Exception{
String inputFile = args[0];
String tableName = args[1];
String outFile = args[2];
Path inputPath = new Path(inputFile);
Path outPath = new Path(outFile);
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
//set the configurations
conf.set("mapred.job.tracker", "localhost:54311");
//Input data to HTable using Map Reduce
Job job = new Job(conf, "MapReduce - Word Frequency Count");
job.setJarByClass(MapReduce.class);
job.setInputFormatClass(TextInputFormat.class);
FileInputFormat.addInputPath(job, inputPath);
fs.delete(outPath);
FileOutputFormat.setOutputPath(job, outPath);
job.setMapperClass(MapReduce.MyMap.class);
job.setMapOutputKeyClass(ImmutableBytesWritable.class);
job.setMapOutputValueClass(KeyValue.class);
HTable hTable = new HTable(conf, tableName.toUpperCase());
// Auto configure partitioner and reducer
HFileOutputFormat.configureIncrementalLoad(job, hTable);
job.waitForCompletion(true);
// Load generated HFiles into table
LoadIncrementalHFiles loader = new LoadIncrementalHFiles(conf);
loader.doBulkLoad(new Path(outFile), hTable);
}
사람이 내가 HBase를 내 데이터 삽입을 방지하는 여기에서 일어나는 잘못된 일을 알아내는 나를 도울 수 있다면 나는 감사하겠습니다 :
다음은 내지도-감소 드라이버 클래스의 코드입니다.
미리 감사드립니다.
_0은 내 열 패밀리의 이름입니다. – ASingh