云服务器内容精选

  • 操作步骤 运行结果会有如下成功信息: ... 2020-01-09 10:43:49,338 INFO [main] examples.HBaseExample: Entering dropTable. 2020-01-09 10:43:49,341 INFO [main] client.HBaseAdmin: Started disable of hbase_sample_table 2020-01-09 10:43:50,080 INFO [main] client.HBaseAdmin: Operation: DISABLE, Table Name: default:hbase_sample_table, procId: 41 completed 2020-01-09 10:43:50,550 INFO [main] client.HBaseAdmin: Operation: DELETE, Table Name: default:hbase_sample_table, procId: 43 completed 2020-01-09 10:43:50,550 INFO [main] examples.HBaseExample: Drop table successfully. 2020-01-09 10:43:50,550 INFO [main] examples.HBaseExample: Exiting dropTable. 2020-01-09 10:43:50,550 INFO [main] client.ConnectionImplementation: Closing master protocol: MasterService 2020-01-09 10:43:50,556 INFO [main] examples.TestMain: -----------finish to test HBase API------------------- 在Windows环境运行样例代码时会出现下面的异常,但是不影响业务: java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries. 日志说明 日志级别默认为INFO,可以通过调整日志打印级别(DEBUG,INFO,WARN,ERROR,FATAL)来显示更详细的信息。可以通过修改log4j.properties文件来实现,如: hbase.root.logger=INFO,console log4j.logger.org.apache.zookeeper=INFO #log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG log4j.logger.org.apache.hadoop.hbase=INFO # Make these two classes DEBUG-level. Make them DEBUG to see more zk debug. log4j.logger.org.apache.hadoop.hbase.zookeeper.ZKUtil=INFO log4j.logger.org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher=INFO
  • 操作步骤 运行结果会有如下成功信息: 2016-07-13 14:36:12,736 INFO [main] basic.CreateTableSample: Create table sampleNameSpace:sampleTable successful! 2016-07-13 14:36:15,426 INFO [main] basic.ModifyTableSample: Modify table sampleNameSpace:sampleTable successfully. 2016-07-13 14:36:16,708 INFO [main] basic.MultiSplitSample: Mmulti split table sampleNameSpace:sampleTable successfully. 2016-07-13 14:36:17,299 INFO [main] basic.PutDataSample: Successfully put 9 items data into sampleNameSpace:sampleTable. 2016-07-13 14:36:18,992 INFO [main] basic.ScanSample: Scan data successfully. 2016-07-13 14:36:20,532 INFO [main] basic.DeletaDataSample: Successfully delete data from table sampleNameSpace:sampleTable. 2016-07-13 14:36:21,006 INFO [main] acl.AclSample: Grant ACL for table sampleNameSpace:sampleTable successfully. 2016-07-13 14:36:27,836 INFO [main] index.CreateIndexSample: Successfully add index for table sampleNameSpace:sampleTable. 在Windows环境运行样例代码时会出现下面的异常,但是不影响业务: java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries. HBase/Phoenix对接SpringBoot运行结果: 在浏览器上访问链接“http://样例运行节点IP地址:8080/hbase/HBaseDemo”和“http://样例运行节点IP地址:8080/hbase/PhoenixDemo”,IDEA正常打印日志,请求返回“finish HBase”和“finish Phoenix",如下图所示: 图1 返回“finish HBase” 图2 返回“finish Phoenix" 日志说明 日志级别默认为INFO,可以通过调整日志打印级别(DEBUG,INFO,WARN,ERROR,FATL)来显示更详细的信息。可以通过修改log4j.properties文件来实现,如: hbase.root.logger=INFO,console ... log4j.logger.org.apache.zookeeper=INFO #log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG log4j.logger.org.apache.hadoop.hbase=INFO # Make these two classes DEBUG-level. Make them DEBUG to see more zk debug. log4j.logger.org.apache.hadoop.hbase.zookeeper.ZKUtil=INFO log4j.logger.org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher=INFO ...