上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页
摘要: 1 package cn.scala_base.oop.scalaobject 2 3 import java.security.cert.Extension 4 5 /** 6 * object的构造器必须是无参的,且且构造器只会在第一次调用object时被调用 7 * 同一个scala文件下同名的object与class成为伴生对象与伴生类可以互访各自的私有field ... 阅读全文
posted @ 2018-11-29 16:34 tele 阅读(588) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.scala_base.oop.scalaobject; 2 3 class Boy(name: String) { 4 private var age: Int = 0; 5 6 println(name); 7 8 def this(name: String, age: Int) { 9 //调用主构造器 10 th... 阅读全文
posted @ 2018-11-29 16:31 tele 阅读(743) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.scala_base 2 3 /** 4 * map常用操作 5 */ 6 object Map { 7 8 def main(args: Array[String]): Unit = { 9 10 //1.不可变map(有序) 11 val map1 = scala.collection.immutable... 阅读全文
posted @ 2018-11-28 16:18 tele 阅读(14555) 评论(0) 推荐(0) 编辑
摘要: window->proference,把方框中那两个选项去掉不选,保存即可(或者只选择scala completions(java sources)),(只不过这么做之后就没有代码提示了)遇到这种问题,多半是因为你在eclipse中装了scala的插件,建议使用scala IDE (也是eclips 阅读全文
posted @ 2018-11-27 16:31 tele 阅读(1446) 评论(0) 推荐(0) 编辑
摘要: 缺少jar包 到maven仓库下载json in java 之后把jar包上传至sqoop的lib目录下即可 阅读全文
posted @ 2018-11-26 15:24 tele 阅读(2009) 评论(0) 推荐(0) 编辑
摘要: 环境: hadoop2.7.7 mysql 8 zk 3.4.10 hive 3 1.上传并解压tar包后进入conf目录 拷贝sqoop-env-template.sh并重命名为sqoop-env.sh(conf目录下已经有了sqoop-site.xml) 2.编辑sqoop-env.sh,添加如 阅读全文
posted @ 2018-11-25 15:31 tele 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 使用sqoop导入数据时报了如题的异常,异常的提示是 The connection property 'zeroDateTimeBehavior' acceptable values are: 'CONVERT_TO_NULL', 'EXCEPTION' or 'ROUND'. The value 阅读全文
posted @ 2018-11-25 14:35 tele 阅读(8921) 评论(1) 推荐(1) 编辑
摘要: 1 public static boolean isExistColumnFamily(String tableName,String cf) throws IOException { 2 if(isExistTable(tableName)) { 3 Table table = conn.getTable(TableName.valueOf(tab... 阅读全文
posted @ 2018-11-23 16:43 tele 阅读(2450) 评论(0) 推荐(0) 编辑
摘要: 效果图 1.在web.xml中加上如下配置.其实就是利用servlet的目录过滤,这样所有带有news的地址都会被拦截 一定要放在.actiobn下面,否则springmvc会无法找到对应的controller 1 <!-- restfull风格约定,去除前台超链接访问的后缀 --> 2 <serv 阅读全文
posted @ 2018-11-23 16:04 tele 阅读(1732) 评论(0) 推荐(0) 编辑
摘要: 测试的inbox表为多版本表,封装的scanTable已设置查询全部版本,以下的测试基于hbase2.0.2 一.put(针对相同的rowkey) 测试1.使用方法链的形式对同一个put添加数据到不同的列 控制台结果: 可以看到put中的数据是正确的但是真正插入的数据只有最后一个版本 测试2.put 阅读全文
posted @ 2018-11-23 15:20 tele 阅读(2242) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页