Posts

Showing posts from October, 2014

get key and value from properties file in different location, ratherthan current source directory

/** * it receive the property value for the tree view preference. * @param key * @return */ public static String getPluginProperty(String key, String file) { String str = null; FileInputStream fis=null; try { Properties p = new Properties(); if(file.isEmpty()) { fis = new FileInputStream(PLUGIN_NAME); }else { fis = new FileInputStream(file); } p.load(fis); str = p.getProperty(key); } catch (Exception s) { } return str; } /** * gives all property keys from the properties file */ public static void getPreferenceValues() { ResourceBundle preferenceBundle = null; FileInputStream fis; File filename=new File(System.getProperty("user.home")+ "\\mmsb\\mmsb_preference.properties"); try { if(filename.exists()) { fis = new FileInputStream(filename); }else { return ; } preferenceBundle = new PropertyResource...
Hadoop Setup Hadoop2.4.1 Unable to load realm info from SCDynamicStore to solve this issue in Mac OS mavericks or Yosemite OS X 1. Set your JAVA_HOME correctly  2. Set you hadoop-env.sh with following  export HADOOP_OPTS="-Djava.security.krb5.realm= -Djava.security.krb5.kdc=" export HADOOP_OPTS="${HADOOP_OPTS} -Djava.security.krb5.realm= -Djava.security.krb5.kdc=" export HADOOP_OPTS="${HADOOP_OPTS} -Djava.security.krb5.conf=/dev/null" 3. Restart you Hadoop cluster