自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 问答 (1)
  • 收藏
  • 关注

原创 上传本地文件到HDFS

1. 根据配置文件得到三个待用目录 本地文件目录 (待上传目录) hdfs远程文件备份目录(hdfs备用目录) hdfs远程文件归档目录(hdfs正式路径) hdfs的文件操作封装成工具类,随时供调用 public class HDFSUtil { protected static Configuration conf; protected FileSystem...

2019-03-18 17:26:06 4464 1

原创 org.apache.commons.codec.DecoderException:Illegal hexadecimal character h at index 4

org.apache.commons.codec.DecoderException: Illegal hexadecimal character h at index 4 2019-01-25 17:42:52,838|ERROR|InfoPointThread-27|com.eshore.ecache.helper.CassandraHelper.getCluster(CassandraHe...

2019-01-26 17:21:43 12668

原创 Cassandra报错: com.datastax.driver.core.ConnectionException:Pool was closed during initialization

  Cassandra报错: com.datastax.driver.core.ConnectionException:Pool was closed during initialization 2019-01-26 16:19:46,223|WARN|cluster1-nio-worker-3|com.google.common.util.concurrent.Futures$6.run(...

2019-01-26 17:11:05 2440

原创 PLSQL 创建函数步骤

1. File-->New-->Program Window-->Function . 2.按照填写函数名称,参数值和返回值 3.OK后进入函数编辑窗口,窗口中有一个简明的函数模板。 PL/SQL是块结构语言; PL/SQL程序划分成几个部分,并在每个部分中写入逻辑代码块。每个块由三个子部分组成 - 声明部分 - 此部分是以关键字DECLARE开头。这是一个可选部...

2019-01-09 11:11:49 10335 1

原创 系统文件日志筛查总结--grep命令

grep grep 作用: 搜索匹配模式的指定行信息。 用法: grep [选项]... PATTERN [FILE]... 英文过关且可以翻墙的可直接翻阅官方说明手册(共39页,不算大部头):http://www.gnu.org/software/grep/manual/grep.pdf   常用grep搜索 博主经验积累下的常用选项重点讲解,记住下面的,常规搜索就足够使用了(以下可合...

2019-01-03 17:41:53 1588

原创 Retrieving a Key by a Value--by Tim O'Brien 整理by博主

有时我们不仅要以Key来获取Value,还要通过Value值获取Key,BidiMap实现了Key和Value的双向查找,但此时Key和Value必须一一对应。不可一个Key对应多个Value。    Maven项目使用前,请加入commons-collections依赖在你的项目pom.xml中。    下面为一个简单的应用,inverseBidiMap()方法的使用来实现反向获取: im

2016-02-18 16:12:46 579

原创 Storing Multiple Values in a Map--by Tim O'Brien 整理by博主

当我们需要实现key和value间的一对多关系时,MultiMap必不可少。   Maven项目使用前,加入下述依赖在你的项目pom.xml中。 commons-collections commons-collections 3.2.1   一个简单MutiMap实例: import java.util.Collection; import java.util.Iterator; impo

2016-02-18 11:56:41 508

原创 Java CookBook--Using a BlockingBuffer--by Tim O'Brien 整理by博主

BlockingBuffer的使用:在操作对象前需要等待输入的情况要用到BlockingBuffer   Maven项目使用前,加入下述依赖在你的项目pom.xml中。 commons-collections commons-collections 3.2.1   在多线程的情况下,才能验证BlockingBuffer,以下是一个简单的BlockingBuffer使用实例,主线程往Block

2016-02-18 11:15:03 638

原创 Java CookBook--Creating a Priority Queue--by Tim O'Brien 整理by博主

按优先级排列的集合对象PriorityBuffer用法,来自org.apache.commons.collections.buffers.PriorityBuffer   PriorityBuffer使用比较器Comparator来排列内容,若使用不包含比较器Comparator的PriorityBuffer,此时所有放入PriorityBuffer中的对象都要实现Comparable接口,Pr

2016-02-17 17:19:49 447

原创 Java CookBook--Using a Buffer--by Tim O'Brien 整理by博主

数据结构Buffer的使用   下面是一个最简单的Buffer实现UnboundedFifoBuffer的使用实例,UnboundedFifoBuffer是一个先进先出无大小限制的数据结构,如果无限制的添加,可能会耗尽内存。 import org.apache.commons.collections.Buffer; import org.apache.commons.collections.b

2016-02-17 11:46:18 415

原创 Java CookBook--Using a Bag--by Tim O'Brien 整理by博主

org.apache.commons.Collections.Bag的使用实例

2016-02-17 10:46:27 465

转载 Java CookBook Learning Day5th--HTTP (by Tim O'Brien)

You need to work with a system that uses cookies to store state, and you need to be able to set cookies as well as keep track of cookies set by the server. You need to access a server that may send an arbitrary number of redirects. You need to work with a

2016-01-11 15:30:01 729

转载 Java CookBook Learning Day4th--HTTP (by Tim O'Brien)

You need to access information protected by HTTP Basic Authentication. You need to access a resource that is protected by Microsoft's NTLM authentication protocol.

2016-01-11 10:25:06 486

转载 Java CookBook Learning Day3rd--HTTP (by Tim O'Brien)

You need to supply parameters to a script or servlet using HTTP POST. You need to send the data from a file in an HTTP POST request. You need to upload a file or a set of files with an HTTP multipart POST.

2016-01-11 09:02:49 614

转载 Java CookBook Learning Day2nd--HTTP (by Tim O'Brien)

You need to see the low-level communications between the client and the server.

2016-01-08 16:21:32 641

原创 Java CookBook Learning Day1st--HTTP (by Tim O'Brien)

Apache HttpClient, a set of utilities that simplifies the task of retrieving and sending information over HTTP.

2015-12-22 20:47:24 868

原创 网络安全基础知识学习--截取自网络安全教材

网络安全就是运用各种技术手段,解决如下四个方面的问题:  私有性-保证通信信息在网络传输过程中不能被第三方窃听者破译;  完整性-接受方能检测出信息在网络传输过程中是否被篡改;  确认性-接受方能有效地对信息发送方的身份进行认证;  不可否认性-接受方一旦接受到发送方的有效信息,发送在事后无法予以抵赖。

2015-12-02 15:58:46 1223

原创 maven项目,代码正确的情况下,整个项目中的类报cannot be resolved to a type

eclipse中,导入maven项目, install后,仍有很多类报cannot be resolved to a type,这是因为未update maven, 并且项目的clean与maven的clean不同步的结果 解决方案:   step1.  Project--clean   step2:点击项目右键-->maven-->update project 错误消失,感觉整个世界都清

2015-12-02 15:39:23 7095 2

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除