Tag Archives: java

Comparison method violates its general contract!

源码 list.sorted((o1, o2) -> { return o1.getCreateTime().getTime() -... Read More | Share it now!

Java读写avro例子

https://www.cnblogs.com/fillPv/p/5009737.html avro是一个数据序列化框架,可以高效得进行序列化和反序列化,支持C, C++, C#, Java, PHP, Python,... Read More | Share it now!

Avro与JAVA

https://shift-alt-ctrl.iteye.com/blog/2217425    ... Read More | Share it now!

解决PKIX:unable to find valid certification path to requested target 的问题

MVN build 时候忽然遇到这样的异常: e: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested... Read More | Share it now!

Script to install jenkins on ubuntu

echo "START" >> /tmp/status.txt sudo chmod 777 /tmp/status.txt # config jenkins installer on ubuntu sudo add-apt-repository ppa:webupd8team/java -y wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - # config java8... Read More | Share it now!

java.lang.reflect.Constructor

一、Constructor类是什么 Constructor是一个类,位于java.lang.reflect包下。 在Java反射中 Constructor类描述的是 类的构造方法信息,通俗来讲 有一个类如下: package com.testReflect; public class ConstructorDemo { ... Read More | Share it now!

Ubuntu 16.04安装Java JDK

Java JDK有两个版本,一个开源版本Openjdk,还有一个oracle官方版本jdk。下面记录在Ubuntu 16.04上安装Java JDK的步骤。 安装openjdk 更新软件包列表: $ sudo apt-get update 安装openjdk-8-jdk: $ sudo apt-get... Read More | Share it now!

“bad substitution” error running Spark on Yarn

you can update the hdp.version property through Ambari GUI. below are the steps: 1. Go to ‘Ambari -> YARN -> configs’ and go to ‘Advanced’ tab. 2. scroll down the page to till end, there will find an option to add custom... Read More | Share it now!

新旧MapReduce 的API对比

Hadoop 的版本0.20包含一个新的java MapReduce API,我们也称他为上下文对象(context... Read More | Share it now!

线程池实例:使用Executors和ThreadPoolExecutor

线程池负责管理工作线程,包含一个等待执行的任务队列。线程池的任务队列是一个Runnable集合,工作线程负责从任务队列中取出并执行Runnable对象。 java.util.concurrent.executors 提供了 java.util.concurrent.executor 接口的一个Java实现,可以创建线程池。下面是一个简单示例: 首先创建一个Runable... Read More | Share it now!