0%

一、hostname 修改详解

  1. 暂时性修改使用命令:
    1
    hostname ******
    此命令不用重启,重新打开一个终端,即可看到修改。但是重启后失效(本人red hat5竟然不会)
  2. 永久性修改
在1之后,修改 /etc/sysconfig/network

二、配置ssh

本节参考:网址

  1. 生成公钥
    1
    $ssh-keygen 
  2. 公钥分发到远程主机
    1
    $ ssh-copy-id user@host

1
2
3
4
5
6
7
8
9
10
11
12
13
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
df:a8:ff:b2:0d:f8:1c:a9:d9:f9:fa:39:29:9d:6f:42.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:13
RSA host key for lab3 has changed and you have requested strict checking.
Host key verification failed.

问题解决:
删除/root/.ssh/known_hosts:13行中的信息即可

阅读全文 »

1.Hbase web整合报以下错误
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;] with root cause
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
解决方案
pom文件中排出冲突jar

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 <!-- hbase -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.0.0-cdh5.4.0</version>
<exclusions>
<exclusion>
<artifactId>jasper-compiler</artifactId>
<groupId>tomcat</groupId>
</exclusion>
<exclusion>
<artifactId>jasper-runtime</artifactId>
<groupId>tomcat</groupId>
</exclusion>
</exclusions>
</dependency>

2.Hbase jar引入,pom报错误Missing artifact jdk.tools:jdk.tools:jar:1.7
** 解决方案**
eclipse.ini (before -vmargs!):


-vm
C:/{your_path_to_jdk170}/jre/bin/server/jvm.dll

出现该错误的原因是eclipse bug ,eclipse打开使用的是jre 不是jdk下面的jre ,因此未找到tools.jar


3.eclipse java api 访问hbase 失败
** 解决方案**

  • zookeeper工作是否正常
  • 防火墙是否关闭

背景

 hadoop体系中许多数据是存放在hbase中,为了便捷实用其中的数据,可以将数据迁移到hive中,通过hive sql 可以迅速便捷的获取并操作相应的数据,同时还可以实用hive sql实现一些mapreduce 操作。具体hive优势详见官网

目的

将hbase已存在的表数据迁移到hive中

操作步骤

版本环境

soft version
hive hive-1.1.0-cdh5.4.0
hbase hbase-1.0.0-cdh5.4.0

准备

首先要确保HIVE_HOME/lib 下HBase的jar包的版本要和实际环境中HBase的版本一致,需要用HBASE_HOME/lib/目录下得jar包:


hbase-client-1.0.0-cdh5.4.0.jar 
hbase-common-1.0.0-cdh5.4.0-tests.jar
hbase-common-1.0.0-cdh5.4.0.jar
hbase-protocol-1.0.0-cdh5.4.0.jar
hbase-server-1.0.0-cdh5.4.0.jar
htrace-core-3.0.4.jar
htrace-core-3.1.0-incubating.jar 
阅读全文 »

问题1

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org/apach e/hadoop/hbase/mapreduce/TableInputFormatBase

** 解决方法:**


将hbase/lib下
hbase-common-1.0.0-cdh5.4.0-tests.jar
hbase-common-1.0.0-cdh5.4.0.jar
copy到hive/lib下面

问题2

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaExcep tion(message:MetaException(message:java.io.IOException: java.lang.reflect.InvocationTargetExc eption
** 解决方法:**


将hbase/lib下
htrace-core-3.0.4.jar
htrace-core-3.1.0-incubating.jar
copy到hive/lib下面

问题3

阅读全文 »

搭建hbase单机版

目的

 本教程为了搭建一个hbas单机版本,搭建好可以便于练习使用hbase,选用的版本不是最新的,但搭建原理都是一样的。单机版数据存储在本地文件上,使用自带的zookeeper。

准备

1.下载hbase-0.94.27

安装与部署

  • 安装
    
    tar -xvf hbase-0.94.27.tar.gz 
    
  • 配置

1.编辑conf/hbase-env.sh


export JAVA_HOME=/opt/jdk1.8.0_45
export HBASE_MANAGES_ZK=true

2.编辑conf/hbase-site.xml

阅读全文 »

Markdown语法学习

第一节:章节 项目

  • 部署
  • 实验
  • 测试

1.开发

2.发布

第二节:杂乱

分割线



代码

阅读全文 »