摘要: 1. 基本原理: 通过hadoop fs -ls *命令获取相关文件或目录的修改时间,然后与设定的过期时间进行比较,之后执行删除操作即可 2. 相关代码: 参考:Hadoop运维-删除目录下过期的数据 阅读全文
posted @ 2016-11-29 17:32 mengrennwpu 阅读(7939) 评论(0) 推荐(2)
摘要: Scala's object-oriented collections support mutable and immutable type hierarchies. Also support functional higher-order operations such as map, filte 阅读全文
posted @ 2016-11-28 22:31 mengrennwpu 阅读(357) 评论(0) 推荐(0)
摘要: The basic functional cornerstones of Scala: immutable data types, passing of functions as parameters and pattern matching. 1. Basic Pattern Matching I 阅读全文
posted @ 2016-11-27 17:20 mengrennwpu 阅读(330) 评论(0) 推荐(0)
摘要: 1. Functional programming treats computation as the evaluation of mathematical and avoids state and mutable data. Scala encourages an expression-orien 阅读全文
posted @ 2016-11-27 15:02 mengrennwpu 阅读(329) 评论(0) 推荐(0)
摘要: 1. The three principles of OOP are encapsulation(封装性), inheritance(继承性) and polymorphism(多态性). example: A subtype is guaranteed to have all the member 阅读全文
posted @ 2016-11-26 12:43 mengrennwpu 阅读(270) 评论(0) 推荐(0)
摘要: 1. Variables (1) Three ways to define variables: 1) val refers to define an immutable variable; 2) var refers to define a mutable variable. 3) lazy va 阅读全文
posted @ 2016-11-25 15:27 mengrennwpu 阅读(271) 评论(0) 推荐(0)
摘要: 1. Scala is a contraction of "scalable" and "language". It's a fusion of objected-oritended and functional programming. 2. Compare Book class between 阅读全文
posted @ 2016-11-25 14:32 mengrennwpu 阅读(227) 评论(0) 推荐(0)
摘要: 最近翻看Redis相关的中文书籍时,发现了很多错误,包括翻译错误及理论错误,因此想搜集一些相关的外文书籍看看。以下几个链接,内容大同小异,均可免费下载相关的英文书籍PDF版,内容涵盖了IT的方方面面。 1. https://ebooks-it.org/【需要FQ,且更新不及时】 2. http:// 阅读全文
posted @ 2016-02-27 22:07 mengrennwpu 阅读(407) 评论(0) 推荐(0)
摘要: 1. Redis事务 Redis中的事务(transaction)是一组命令的集合,一个事务中的命令要么都执行,要么都不执行。事务的原理是先将属于一个事务的命令发送给Redis,然后再让Redis依次执行这些命令。 127.0.0.1:6379> multi OK 127.0.0.1:6379> s 阅读全文
posted @ 2016-02-16 00:03 mengrennwpu 阅读(4377) 评论(0) 推荐(0)
摘要: 1. MongoDB的特点: (1) 易于使用 MongoDB是一个面向文档的数据库,非关系型数据库。通过在文档中嵌入式文档和数据,面向对象的方法能够仅使用一条记录来表现复杂的层次关系。文档的键和值不再是固定的类型和大小。 (2) 易于扩展 MongoDB的设计采用横向扩展,即通过... 阅读全文
posted @ 2016-01-20 21:53 mengrennwpu 阅读(249) 评论(0) 推荐(0)