Skip to content

Instantly share code, notes, and snippets.

View fivesmallq's full-sized avatar
🎯
Focusing

fivesmallq fivesmallq

🎯
Focusing
View GitHub Profile
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
2014-05-30 23:29:10 [main:MutableMetricsFactory:1 ] - [ DEBUG ] field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginSuccess with annotation @org.apache.hadoop.metrics2.annotation.Metric(valueName=Time, about=, value=[Rate of successful kerberos logins and latency (milliseconds)], always=false, type=DEFAULT, sampleName=Ops)
2014-05-30 23:29:10 [main:MutableMetricsFactory:9 ] - [ DEBUG ] field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginFailure with annotation @org.apache.hadoop.metrics2.annotation.Metric(valueName=Time, about=, value=[Rate of failed kerberos logins and latency (milliseconds)], always=false, type=DEFAULT, sampleName=Ops)
2014-05-30 23:29:10 [main:MutableMetricsFactory:10 ] - [ DEBUG ] field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.getGroups with annotation
import java.io.IOException;
import java.security.PrivilegedExceptionAction;
import java.util.Iterator;
import java.util.StringTokenizer;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
14/05/30 16:02:47 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
2014-05-30 16:02:47.807 java[27723:1003] Unable to load realm info from SCDynamicStore
2014-05-30 16:02:47.809 java[27723:1003] Unable to load realm info from SCDynamicStore
14/05/30 16:02:47 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/05/30 16:02:47 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
14/05/30 16:02:48 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
14/05/30 16:02:48 WARN mapred.JobClient: No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).
14/05/30 16:02:57 INFO mapred.FileInputFormat: Total input paths to process : 1
14/05/30 16:02:57 INFO hdfs.DFSClient: Exception in createBlockOutputStream
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
2014-05-29 16:21:20.007 java[3866:1003] Unable to load realm info from SCDynamicStore
14/05/29 16:21:20 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2014-05-29 16:21:20.091 java[3866:1003] Unable to load realm info from SCDynamicStore
14/05/29 16:21:21 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
14/05/29 16:21:21 WARN mapred.JobClient: No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).
14/05/29 16:21:21 INFO input.FileInputFormat: Total input paths to process : 1
14/05/29 16:21:21 INFO hdfs.DFSClient: Exception in createBlockOutputStream
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- Replace the group ID with your group ID -->
<groupId>com.mycompany.hadoopproject</groupId>
<!-- Replace the artifact ID with the name of your project -->
<artifactId>my-hadoop-project</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
package com.novacloud.data.job.demo;
import java.io.IOException;
import java.util.Iterator;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.FileInputFormat;
public class Fibonacci {
public static void main(String[] args) {
int result = 0;
int first = 0, second = 1;
int sum = 0;
for (;;) {
result = first + second;
if (result > 4000000) {
break;
@fivesmallq
fivesmallq / InjectorImpl.java
Last active August 29, 2015 14:00
guice just in time
/**
* Returns a just-in-time binding for {@code key}, creating it if necessary.
*
* @throws ErrorsException if the binding could not be created.
*/
private <T> BindingImpl<T> getJustInTimeBinding(Key<T> key, Errors errors, JitLimitation jitType)
throws ErrorsException {
boolean jitOverride = isProvider(key) || isTypeLiteral(key) || isMembersInjector(key);
synchronized (state.lock()) {
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
Enable Shared Folders on vmware Fusion (4.x)+ (Example OS: Linux Ubuntu 12.x as guest OS)
1. First update your linux system:
sudo apt-get update
sudo apt-get install -y build-essential
sudo aptitude -y safe-upgrade
2. Reboot your system just in case you have a new kernel
sudo shutdown -r now