- 博客(20)
- 收藏
- 关注
原创 Slipstream 实验
Slipstreamcreateapplication{application_user_name};useapplication{application_user_name}//基于KafkaTopic创建输入流表logscreate streamlogs(ip string, url string, time timestamp) row format delimited fields terminated by ',' tblproperties( "topic"=...
2021-11-06 22:10:21 230
原创 Hive 实验
//创建数据库并导入数据1. create database{database_name};2.use{database_name};3. create table docs(line string);4. load data inpath '/training/{student_name}/inceptor_data/wordcount' into table docs;//创建结果表create table wc(word string, totalword int)...
2021-11-06 21:59:38 1487
原创 kafka 实验
创建TOPIC./kafka-topics.sh --bootstrap-server{Broker_List}--create --topic{topic_ name}--partitions 1 --replication-factor1--command-config /transwarp/Desktop/TDH-Client/kafka/config/consumer.properties//列出所有Topic,查看Topic是否创建成功./kafka-topics....
2021-11-06 21:54:53 1357
原创 YARN wordcount
在本地创建wordcount.txt文件,并完成数据写入echo -e "Deer Bear River\nCar Car River\nDeer Car Bear" > wordcount.txthadoop fs -mkdir -p /training/{student_name}/yarn_data/wordcount_inputhadoop fs -put wordcount.txt /training/{student_name}/yarn_data/wordcount_input
2021-11-06 17:57:25 96
原创 hdfs基本操作命令
命令可以用 hadoop fs 或者 hdfs dfs 开头。后者更新。1. 查看文件夹中的文件hadoop fs -ls /training2. 创建目录hadoopfs -mkdir-p/training/{student_name}/hdfs_data3. 更改文件权限hadoop fs-chmod-R 777/training/{student_name}/hdfs_data4. 上传文件echo "Hello Hadoop File System...
2021-11-06 16:02:58 931
原创 vmware workstation ubuntu虚拟机无法使用共享目录
问题描述:在vmware workstation 安装ubuntu虚拟机,并设置share folder。启动ubuntu后再/mnt/目录下没有共享目录。使用 vmware-hgfsclient 可以查询到share folder的名字。该问题在ubuntu 14.04 和 16.04 版本上都存在。估计在14.04以后的版本中都存在。该解决方案在16.04版本测...
2016-06-27 14:46:47 363
原创 Intellij Idea tomcat 临时目录
网上找到了spring保存上传文件为临时文件的目录是[code="java"]System.getProperty("java.io.tmpdir")windows一般在C:\Users\212361~1\AppData\Local\Temp\[/code]未验证在非Intellij中是否正确。读源码得知[code="java"]((CommonsMultipartFi...
2015-12-16 17:28:20 2183
原创 偶尔发生File has been moved - cannot be read again
使用SPRING上传文件偶尔遇到报错:[code="java"]java.lang.IllegalStateException: File has been moved - cannot be read again at org.springframework.web.multipart.commons.CommonsMultipartFile.getInputStream(Commo...
2015-12-16 16:35:24 590 1
原创 Java 语言中集合,对象数组,原始类型(primitive)数组互相转换的工具类
集合-》对象数组-》原始类型数组[code="java"]List integerList = new ArrayList();integerList.add(1);Integer[] integers = integerList.toArray(new Integer[integerList.size()]);int[] ints = ArrayUtils.toPrimi...
2015-11-09 22:11:05 507
原创 如何考量BS架构的高层设计
1. 数据库表之间的关联关系从关联关系可以看到实体间的联系。确定实体间关系后,开发过程中不会有方向性的偏差。2. url设计从url设计可以看出每个网页的大致内容。同样,一个页面的大致内容确定后,开发不会有方向性的偏差。3. 界面流程&设计使用Axure先将网站流程的框图确定。该框图包括网页间的流转,网页的具体内容和布局。确保最终的开发结果满足需求。第2点和第3...
2015-10-27 15:04:07 214
原创 有效减少虚拟机镜像文件的大小
使用该方法后我们项目制作出的镜像大小在2.7G而如果不做清理我们项目制作出的镜像会有18G为了制作的img文件较小,我们需要先清理虚拟机中的垃圾。1.交换区做为硬盘上被划为内存使用的区域,里面的内容是可以清理的。2.把空闲区域的磁盘0格式化。Shrinking the DisksWhen you export your VMs in your OVF package...
2015-09-17 14:08:22 2025
原创 单元测试时测试一个private私有方法
单元测试时测试一个private私有方法时,我们第一想法可能是用java反射机制。[code="java"]...Method method = clazz.getDeclaredMethod(methodName, classes) method.setAccessible(true);method.invoke(obj, objects)[/code]Spr...
2015-07-14 17:39:49 4578
原创 spring data jpa 方法中可用的关键字
spring data jpa 支持以方法名进行查询/删除/统计。查询的关键字为find删除的关键字为delete/remove (>=1.7.x)统计的关键字为count (>=1.7.x) 修改需要使用@Modifying注解@Modifying@Query("update User u set u.firstname = ?1 where u.la...
2015-07-14 17:28:14 399
原创 使用maven或者ant工具打包zip
[b]maven zip 打包[/b]1.pom 配置plugin :[code="java"] org.apache.maven.plugins maven-assembly-plugin 2.4 ...
2015-07-06 10:44:58 756
原创 生成ssh key免密钥登录
执行命令ssh-keygen -t rsa该命令会让用户输入密码,我们设置为空就行。所以连续输入三个回车。我们会在~目录生成两个文件id_rsa和id_rsa.pub拷贝id_rsa.pub公钥到目标服务器...
2015-06-29 18:00:02 533
原创 git 常用命令集合
检出远端仓库[code="java"]git clone username@host:/path/to/repository[/code]添加本地修改[code="java"]git add git add .[/code]提交修改到本地[code="java"]git commit -m "代码提交信息"[/code]推送修改到服务器[code="java...
2015-06-15 11:37:39 77
spring无法获取jar包中的xml配置
[code="java"]19:24:26.662 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Looking for matching resources in directory tree [C:\Depot\git\icm\dev\application\alg...
2015-06-11 19:58:23 534
原创 postgresql rpm 安装
考虑到生产环境可能无法联网所以直接采用RPM安装。下载RPM装包:http://www.postgresql.org/download/postgresql94 - PostgreSQL client programs and librariespostgresql94-contrib - Contributed source and binaries distribute...
2015-06-11 10:37:37 1068
原创 yum/rpm包卸载和安装
JDK example:0. Remove jdk1.4.2 if existrpm -qa | grep jdkrpm -qa | grep gcj (list the installed jdk)yum -y remove java-1.4.2-gcj-compat-1.4.2.0-40jpp.1151. Download jdk-6u45-linux-i586.bi...
2015-06-11 09:56:45 216
原创 VM克隆CentOS后设置IP
Remove the kernel’s networking interface rules file so that it can be regenerated# rm -f /etc/udev/rules.d/70-persistent-net.rulesRestart the VM# rebootUPDATE your interface configuration ...
2015-06-11 09:32:29 111
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人