Creating an sbt project

Posted: August 10, 2015 in Uncategorized

resolvers += “sbt-idea-repo” at “http://mpeltonen.github.com/maven/”

addSbtPlugin(“io.spray” % “sbt-revolver” % “0.7.2”)

addSbtPlugin(“com.github.mpeltonen” % “sbt-idea” % “1.5.2”)

addSbtPlugin(“com.eed3si9n” % “sbt-assembly” % “0.11.2”)

// Scala Style Plugin

addSbtPlugin(“org.scalastyle” %% “scalastylesbtplugin” % “0.3.2”)

// Enable the SBT eclipse plugin

addSbtPlugin(“com.typesafe.sbteclipse” % “sbteclipseplugin” % “2.2.0”)

addSbtPlugin(“org.scoverage” % “sbtscoverage” % “1.1.0”)

Java locks

Posted: December 3, 2014 in Uncategorized

public void reloadSchemas() throws ARMAException {
Lock writeLock = lockObject.writeLock();
writeLock.lock();
try {
this.latestSchema = loadSchemaFromServer();
this.activeSchema = latestSchema;
this.allSchemaCrc = computeAllSchemaCRC();
} finally {
writeLock.unlock();
}
}

File watcher

Posted: November 7, 2014 in Uncategorized

http://javaevangelist.blogspot.in/2013/09/apache-commons-io-file-monitoring.html

http://commons.apache.org/proper/commons-io//javadocs/api-release/org/apache/commons/io/monitor/FileAlterationObserver.html

Usage of memcached

Posted: October 9, 2014 in Uncategorized

HTablePool

Posted: February 17, 2014 in Uncategorized

private HTablePool pool;

private HBaseSingleton() {
logger.info(“Creating HBase instance pool.”);

Configuration config = HBaseConfiguration.create();
config.set(HBASE_ZOOKEEPER_QUORUM, HBASE_ZOOKEEPER_QUORUM_VALUE);
config.set(HBASE_ZOOKEEPER_PROPERTY_CLIENT_PORT,HBASE_ZOOKEEPER_PROPERTY_CLIENT_PORT_VALUE);

setPool(new HTablePool(config, MAX));
}

private void setPool(HTablePool pool) {
this.pool = pool;
}

Maven Appassembler

Posted: February 13, 2014 in Uncategorized

http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/usage-program.html

The NLineInputFormat

Posted: January 31, 2014 in Uncategorized

http://hadooped.blogspot.in/2013/09/nlineinputformat-in-java-mapreduce-use.html