Wednesday, February 20, 2013

SVN color diff

svn diff somefile | vim -

Friday, February 15, 2013

Scala SBT

Requirements: 


  1. Include scala-library.jar in the zip file because the machine may not have scala installed. 
  2. Include scripts and configure files into the zip just like Maven assembly. 
  3. Include the jar in the zip file. 

 Lessons:

  1. Key. 
    • SettingKey and TaskKey
    • Cannot reference Key directory. Need to use tuple like this:
      (sbt_key) => { key_val => }
    • projectBin is the jar
    • managed
  2. Must have a Project
  3. libraryDependencies and resolvers defined in Build not effect for the project
  4. IO.zip doesn't support permission of shell scripts
  5. Build with java code perfectly.
  6. custom cleanFiles
  7. Define a custom task like dist
  8. Useful commands of sbt
    settings // list settings keys
    tasks // list all tasks
    show clean-files // check value of settings keys
    inspect clean-files // check more information than show
    

HBase LeaseException issue

Excerpt from http://hbase.apache.org/book.html. If you google "hbase LeaseException", this page may not be on the first page.

12.5.2. LeaseException when calling Scanner.next

In some situations clients that fetch data from a RegionServer get a LeaseException instead of the usual Section 12.5.1, “ScannerTimeoutException or UnknownScannerException”. Usually the source of the exception is org.apache.hadoop.hbase.regionserver.Leases.removeLease(Leases.java:230) (line number may vary). It tends to happen in the context of a slow/freezing RegionServer#next call. It can be prevented by having hbase.rpc.timeout > hbase.regionserver.lease.period. Harsh J investigated the issue as part of the mailing list thread HBase, mail # user - Lease does not exist exceptions