当前位置: 代码迷 >> 综合 >> MapReduce 生成HFile导入Hbase
  详细解决方案

MapReduce 生成HFile导入Hbase

热度:68   发布时间:2023-12-16 17:07:12.0

版本: hadoop 2.7.7 hbase 2.0.5

步骤一:编写Mapreduce 代码生成HFile
基于Gradle 构建
build.gradle

plugins {id 'java'
}group 'com.kteck'
version '1.0-SNAPSHOT'sourceCompatibility = 1.8jar {manifest {attributes "Main-Class": "com.kteck.csvimport.JOB"}from {configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }}
}repositories {mavenLocal()maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'}maven {url 'https://maven.aliyun.com/repository/jcenter'}
}dependencies {compile group: 'org.apache.hadoop', name: 'hadoop-common', version: '2.7.7'compile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: '2.7.7'compile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-common', version: '2.7.7'compile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-jobclient', version: '2.7.7'compile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-core', version: '2.7.7'compile group: 'org.apache.httpcomponents', name: '