/usr/lib/jvm/java-7-openjdk-amd64/bin/java -Didea.launcher.port=7538 -Didea.launcher.bin.path=/usr/local/idea-IC-139.225.3/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rhino.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/compilefontconfig.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/management-agent.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/javazic.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/pulse-java.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/root/IdeaProjects/Test/out/production/HbaseTest:/usr/local/hbase-0.90.3/hbase-0.90.3.jar:/usr/local/hbase-0.90.3/lib/activation-1.1.jar:/usr/local/hbase-0.90.3/lib/asm-3.1.jar:/usr/local/hbase-0.90.3/lib/avro-1.3.3.jar:/usr/local/hbase-0.90.3/lib/commons-cli-1.2.jar:/usr/local/hbase-0.90.3/lib/commons-codec-1.4.jar:/usr/local/hbase-0.90.3/lib/commons-el-1.0.jar:/usr/local/hbase-0.90.3/lib/commons-httpclient-3.1.jar:/usr/local/hbase-0.90.3/lib/commons-lang-2.5.jar:/usr/local/hbase-0.90.3/lib/commons-logging-1.1.1.jar:/usr/local/hbase-0.90.3/lib/commons-net-1.4.1.jar:/usr/local/hbase-0.90.3/lib/core-3.1.1.jar:/usr/local/hbase-0.90.3/lib/guava-r06.jar:/usr/local/hbase-0.90.3/lib/hadoop-0.20.2-core.jar:/usr/local/hbase-0.90.3/lib/jackson-core-asl-1.5.5.jar:/usr/local/hbase-0.90.3/lib/jackson-jaxrs-1.5.5.jar:/usr/local/hbase-0.90.3/lib/jackson-mapper-asl-1.4.2.jar:/usr/local/hbase-0.90.3/lib/jackson-xc-1.5.5.jar:/usr/local/hbase-0.90.3/lib/jasper-compiler-5.5.23.jar:/usr/local/hbase-0.90.3/lib/jasper-runtime-5.5.23.jar:/usr/local/hbase-0.90.3/lib/jaxb-api-2.1.jar:/usr/local/hbase-0.90.3/lib/jaxb-impl-2.1.12.jar:/usr/local/hbase-0.90.3/lib/jersey-core-1.4.jar:/usr/local/hbase-0.90.3/lib/jersey-json-1.4.jar:/usr/local/hbase-0.90.3/lib/jersey-server-1.4.jar:/usr/local/hbase-0.90.3/lib/jettison-1.1.jar:/usr/local/hbase-0.90.3/lib/jetty-6.1.26.jar:/usr/local/hbase-0.90.3/lib/jetty-util-6.1.26.jar:/usr/local/hbase-0.90.3/lib/jruby-complete-1.6.0.jar:/usr/local/hbase-0.90.3/lib/jsp-2.1-6.1.14.jar:/usr/local/hbase-0.90.3/lib/jsp-api-2.1-6.1.14.jar:/usr/local/hbase-0.90.3/lib/jsr311-api-1.1.1.jar:/usr/local/hbase-0.90.3/lib/log4j-1.2.16.jar:/usr/local/hbase-0.90.3/lib/protobuf-java-2.3.0.jar:/usr/local/hbase-0.90.3/lib/servlet-api-2.5-6.1.14.jar:/usr/local/hbase-0.90.3/lib/slf4j-api-1.5.8.jar:/usr/local/hbase-0.90.3/lib/slf4j-log4j12-1.5.8.jar:/usr/local/hbase-0.90.3/lib/stax-api-1.0.1.jar:/usr/local/hbase-0.90.3/lib/thrift-0.2.0.jar:/usr/local/hbase-0.90.3/lib/xmlenc-0.52.jar:/usr/local/hbase-0.90.3/lib/zookeeper-3.3.2.jar:/usr/local/idea-IC-139.225.3/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain PutEcample
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.3.2-1031432, built on 11/05/2010 05:32 GMT
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:host.name=localhost
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:java.version=1.7.0_65
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rhino.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/compilefontconfig.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/management-agent.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/javazic.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/pulse-java.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/root/IdeaProjects/Test/out/production/HbaseTest:/usr/local/hbase-0.90.3/hbase-0.90.3.jar:/usr/local/hbase-0.90.3/lib/activation-1.1.jar:/usr/local/hbase-0.90.3/lib/asm-3.1.jar:/usr/local/hbase-0.90.3/lib/avro-1.3.3.jar:/usr/local/hbase-0.90.3/lib/commons-cli-1.2.jar:/usr/local/hbase-0.90.3/lib/commons-codec-1.4.jar:/usr/local/hbase-0.90.3/lib/commons-el-1.0.jar:/usr/local/hbase-0.90.3/lib/commons-httpclient-3.1.jar:/usr/local/hbase-0.90.3/lib/commons-lang-2.5.jar:/usr/local/hbase-0.90.3/lib/commons-logging-1.1.1.jar:/usr/local/hbase-0.90.3/lib/commons-net-1.4.1.jar:/usr/local/hbase-0.90.3/lib/core-3.1.1.jar:/usr/local/hbase-0.90.3/lib/guava-r06.jar:/usr/local/hbase-0.90.3/lib/hadoop-0.20.2-core.jar:/usr/local/hbase-0.90.3/lib/jackson-core-asl-1.5.5.jar:/usr/local/hbase-0.90.3/lib/jackson-jaxrs-1.5.5.jar:/usr/local/hbase-0.90.3/lib/jackson-mapper-asl-1.4.2.jar:/usr/local/hbase-0.90.3/lib/jackson-xc-1.5.5.jar:/usr/local/hbase-0.90.3/lib/jasper-compiler-5.5.23.jar:/usr/local/hbase-0.90.3/lib/jasper-runtime-5.5.23.jar:/usr/local/hbase-0.90.3/lib/jaxb-api-2.1.jar:/usr/local/hbase-0.90.3/lib/jaxb-impl-2.1.12.jar:/usr/local/hbase-0.90.3/lib/jersey-core-1.4.jar:/usr/local/hbase-0.90.3/lib/jersey-json-1.4.jar:/usr/local/hbase-0.90.3/lib/jersey-server-1.4.jar:/usr/local/hbase-0.90.3/lib/jettison-1.1.jar:/usr/local/hbase-0.90.3/lib/jetty-6.1.26.jar:/usr/local/hbase-0.90.3/lib/jetty-util-6.1.26.jar:/usr/local/hbase-0.90.3/lib/jruby-complete-1.6.0.jar:/usr/local/hbase-0.90.3/lib/jsp-2.1-6.1.14.jar:/usr/local/hbase-0.90.3/lib/jsp-api-2.1-6.1.14.jar:/usr/local/hbase-0.90.3/lib/jsr311-api-1.1.1.jar:/usr/local/hbase-0.90.3/lib/log4j-1.2.16.jar:/usr/local/hbase-0.90.3/lib/protobuf-java-2.3.0.jar:/usr/local/hbase-0.90.3/lib/servlet-api-2.5-6.1.14.jar:/usr/local/hbase-0.90.3/lib/slf4j-api-1.5.8.jar:/usr/local/hbase-0.90.3/lib/slf4j-log4j12-1.5.8.jar:/usr/local/hbase-0.90.3/lib/stax-api-1.0.1.jar:/usr/local/hbase-0.90.3/lib/thrift-0.2.0.jar:/usr/local/hbase-0.90.3/lib/xmlenc-0.52.jar:/usr/local/hbase-0.90.3/lib/zookeeper-3.3.2.jar:/usr/local/idea-IC-139.225.3/lib/idea_rt.jar
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/local/idea-IC-139.225.3/bin::/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:os.version=3.8.0-44-generic
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:user.name=root
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:user.home=/root
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Client environment:user.dir=/root/IdeaProjects/Test
15/01/04 11:18:17 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
15/01/04 11:18:17 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
15/01/04 11:18:17 INFO zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
15/01/04 11:18:17 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x14ab2ae95630011, negotiated timeout = 40000
15/01/04 11:18:17 WARN client.HConnectionManager$HConnectionImplementation: Encountered problems when prefetch META table:
org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META. for table: testtable9, row=testtable9,,99999999999999
at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:136)
at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.prefetchRegionCache(HConnectionManager.java:648)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:702)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:593)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:558)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:146)
at PutEcample.main(PutEcample.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Exception in thread "main" org.apache.hadoop.hbase.TableNotFoundException: testtable9
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:724)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:593)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:558)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:146)
at PutEcample.main(PutEcample.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes; import java.io.IOException; public class PutEcample {
public static void main(String[] args) throws IOException{
Configuration conf= HBaseConfiguration.create();
HBaseAdmin hbase=new HBaseAdmin(conf);
HTableDescriptor desc=new HTableDescriptor("testtable1");
HColumnDescriptor colfam1=new HColumnDescriptor("colfam1".getBytes());
desc.addFamily(colfam1);
hbase.createTable(desc);
HTable table=new HTable(conf,"testtable1");
Put put=new Put(Bytes.toBytes("row1"));
put.add(Bytes.toBytes("colfam1"),Bytes.toBytes("qual1"),Bytes.toBytes("val1"));
//Put.add(Bytes.toBytes("colfam1"),Bytes.toBytes("qual2"),Bytes.toBytes("val2"));
table.put(put);
System.out.println("ok");
}
}

使用hbase的api创建表时要先创建表的结构。

使用hbase的api创建表时出现的异常的更多相关文章

  1. oracle与mysql创建表时的区别

    oracle创建表时,不支持在建表时同时增加字段注释.故采用以下方式: #创建表CREATE TABLE predict_data as ( id integer ), mid ), time dat ...

  2. Oracle创建表时涉及的参数解析

    1.oracle pctfree和pctused详解   http://www.cnblogs.com/linjiqin/archive/2012/01/16/2323320.html http:// ...

  3. mysql创建表时,设置timestamp DEFAULT NULL报错1067 - Invalid default value for &#39;updated_at&#39;

    问题背景: 线上的linux服务器上的mysql服务器中导出数据库的结构.想要在本地创建一个测试版本 导出后再本地mysql上运行却报错   1067 - Invalid default value ...

  4. Mysql 创建表时错误:Tablespace for table `tablexx` exists. Please DISCARD the tablespace before IMPORT.

    在本地的一个数据库创建表时意外的出现了以下错误,说是表已经存在了 但通过desc 查看表信息时又说表不存在 在本地系统搜索表名却发现一个.ibd文件[InnoDB File] 在删除了该.ibd文件文 ...

  5. mysql 创建表时注意事项

    mysql  创建表时注意事项 mysql 想必大家都不会陌生吧  是我学习中第一个接触的的数据库 已学习就很快上手的   这是一个关系型数据库  不懂什么是关系型数据库 啊哈哈哈  现在知道啦  因 ...

  6. MySQL创建表时加入的约束以及外键约束的的意义

    1,创建表时加入的约束 a) 非空约束,not null b) 唯一约束,unique c) 主键约束,primary key d) 外键约束,foreign key 1,非空约束,针对某个字段设置其 ...

  7. MySQL 创建表时,设置时间字段自己主动插入当前时间

    MySQL 创建表时,设置时间字段自己主动插入当前时间 DROP TABLE IF EXISTS `CONTENT`; CREATE TABLE `CONTENT` ( `ID` char(20) N ...

  8. Oracle创建表时Storage参数具体含义

    本文通过图表和实例的阐述在Oracle数据库创建新表时Storage的参数具体含义. 可用于:表空间.回滚段.表.索引.分区.快照.快照日志 参数名称 缺省值 最小值 最大值 说明 INITIAL 5 ...

  9. 【oracle】关于创建表时用default指定默认值的坑

    刚开始学create table的时候没注意,学到后面发现可以指定默认值.于是写了如下语句: 当我查询的时候发现,查出来的结果是这样的.. 很纳闷有没有,我明明指定默认值了呀,为什么创建出来的表还是空 ...

随机推荐

  1. WebRtc VoiceEngine代码解析

    WebRtc中VoiceEngine可以完成大部分的VOIP相关人物,包括采集.自动增益.噪声消除.回声抑制.编解码.RTP传输.下边我们通过代码来解析Voe中处理流程: 创建VoiceEngine和 ...

  2. spark storage之SparkEnv

    此文旨在对spark storage模块进行分析,整理自己所看所得,等以后再整理. ok,首先看看SparkContext中sparkEnv相关代码: private[spark] def creat ...

  3. 关于xml中有特珠字符而导致XmlDocument无法Load的处理

    这是个小事故导致的... 我们线上有个节目里名称里(`F`H9)MSTJXCX0B3J69,虽然我们看到是(`F`H9)MSTJXCX0B3J69,但百思不得其解,发现每次在XmlDocument.L ...

  4. 在VM中给Linux安装Tool

    1.导入tool 2.解压tool 3.打开终端,进入tool的目录,输入  ./XXXXXXX.pl 4.进入安装界面,不断回车即可

  5. RabbitMQ 入门【精+转】

    rabbitmq可以用一本书取讲,这里只是介绍一些使用过程中,常用到的基本的知识点.官方文档覆盖的内容,非常全面:http://www.rabbitmq.com/documentation.html  ...

  6. webstorm调试

    webstorm调试nodejs    https://www.cnblogs.com/dogharry/p/4335157.html webstorm调试js   https://www.cnblo ...

  7. Elasticsearch6.x和Kibana6.x的安装

    Elasticsearch6.x的安装(centos6.x下) Elasticsearch6.x目前需要至少jdk8的支持,关于如何安装jdk不在讲述.Oracle的推荐安装文档可以在Oracle的网 ...

  8. 爬虫之mongodb数据库

    一 mongodb的介绍 1.易用性:mongodb是一款强大.灵活并且易扩展的数据库.他面向于文档的数据库,而不是关系性数据库.不采用关系型主要是为了获得更好的扩展性.还有一个好处就是面向文档的数据 ...

  9. 和我一起打造个简单搜索之ElasticSearch入门

    本文简单介绍了使用 Rest 接口,对 es 进行操作,更深入的学习,可以参考文末部分. 环境 本文以及后续 es 系列文章都基于 5.5.3 这个版本的 elasticsearch ,这个版本比较稳 ...

  10. 使用Cookie进行会话管理

    javaweb学习总结(十一)——使用Cookie进行会话管理 一.会话的概念 会话可简单理解为:用户开一个浏览器,点击多个超链接,访问服务器多个web资源,然后关闭浏览器,整个过程称之为一个会话. ...