- 博客(12)
- 资源 (1)
- 收藏
- 关注
原创 技术文章集锦
zookeeper 分布式锁https://juejin.im/post/6844903729406148622redis 分布式锁https://juejin.im/post/6844903717641142285
2020-08-31 15:07:58
181
转载 docker修改默认存储路径
江湖有多大,坑就有多多……我使用的服务器, 系统盘根目录只有20G, 默认Docker 的镜像文件是安装在/var/lib/docker 目录下的, 这样的话我根本装不了太多的镜像,之前遇到一种情况就是docker服务对磁盘的读写操作太大,而且是软连接方式,导致服务器的磁盘不可用,当然测试环境用的是虚拟服务器。 所以这个中情况需要调整一下。服务器环境:centos7,docker1.12.6...
2020-04-21 19:52:21
632
原创 java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
开始报错JobContext在Hive-exec里面有,所以觉得很奇怪说class not found 。java.lang.NoClassDefFoundError两种原因。1.这个jar包确实没有。导入。2.依赖包有冲突。导致无法加载。这个冲突的包,有可能是这个找不到类所属的jar包。也有可能是函数调用时,其他类的所属jar包冲突了。本例子中JobContext类有,只有一...
2019-12-26 16:58:56
5653
原创 Unable to locate Spring NamespaceHandler for XML schema解决方法
原因有两个:context、aop及其他spring相关的xml命名空间需要特殊Jar包才能解析。必须确保pom文件中依赖了对应的spring jar包。context对应spring-context.jar包。aop对应spring-aop.jar包。如果配置文件中定义了2个及以上的spring xml命名空间,那么要防止jar包中配置文件相互覆盖。spring系列jar包中配置文件的命名及...
2019-11-20 18:03:39
127
原创 java实时写入hdfs
用append 但是注意只有outputstream.close 才能读取hdfs上的文件内容。因此实时写入必须不断创建流,关闭流。System.out.println("开始写入");FSDataOutputStream fsDataOutputStream=fileSystem.append(path);fsDataOutputStream.write(content.getByt...
2018-10-22 19:06:39
3404
原创 Spark ALS算法总结
守护之沙:http://sharkdtu.com/posts/ml-als.html参数:本文主要通过Spark官方的例子理解ALS协同过滤算法的原理和编码过程,然后通过对电影进行推荐来熟悉一个完整的推荐过程。协同过滤协同过滤常被应用于推荐系统,旨在补充用户-商品关联矩阵中所缺失的部分。MLlib当前支持基于模型的协同过滤,其中用户和商品通过一小组隐语义因子进行表达,并且这些因子也用于预测缺失的元...
2018-04-10 20:05:04
1821
原创 max-points-on -a-line
问题描述:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.java方案:需要两重循环,第一重循环遍历起始点a,第二重循环遍历剩余点b。 a和b如果不重合,就可以确定一条直线。 对
2017-08-20 14:44:17
178
原创 minimum-depth-of-binary-tree
问题描述:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.解决方案:class Solution { pu
2017-08-19 19:31:09
138
原创 Evaluate the value of an arithmetic expression in Reverse Polish Notation.
问题描述:Valid operators are+,-,*,/. Each operand may be an integer or another expression.Some examples: ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 ["4", "13", "5", "/", "+"] -> (4 + (
2017-08-19 19:14:19
233
音乐艺术家推荐系统
2018-06-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人