Skip to content

Commit

Permalink
Fixing .classpath which had the wrong hadoop-core version. Also chang…
Browse files Browse the repository at this point in the history
…ed the Mlock related info messages to debug.
  • Loading branch information
Chinmay Soman committed Jan 11, 2013
1 parent c611a8c commit a18d91b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .classpath
Expand Up @@ -20,7 +20,7 @@
<classpathentry kind="lib" path="lib/colt-1.2.0.jar"/>
<classpathentry kind="lib" path="contrib/hadoop-store-builder/lib/commons-cli-2.0-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="contrib/hadoop-store-builder/lib/commons-configuration-1.6.jar"/>
<classpathentry kind="lib" path="contrib/hadoop-store-builder/lib/hadoop-core-1.0.2-p1.jar"/>
<classpathentry kind="lib" path="contrib/hadoop-store-builder/lib/hadoop-core-1.0.4-p2.jar"/>
<classpathentry kind="lib" path="lib/junit-4.6.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="lib/jetty-6.1.18.jar"/>
Expand Down
4 changes: 2 additions & 2 deletions src/java/voldemort/store/readonly/io/MemLock.java
Expand Up @@ -34,7 +34,7 @@ public class MemLock implements Closeable {
public MemLock(File file, FileDescriptor descriptor, long offset, long length)
throws IOException {

log.info("mlocking " + file + " with length " + length);
log.debug("mlocking " + file + " with length " + length);

this.setFile(file);
this.setDescriptor(descriptor);
Expand All @@ -61,7 +61,7 @@ public void close() throws IOException {
mman.munlock(pa, length);
mman.munmap(pa, length);

log.info("munlocking " + file + " with length " + length);
log.debug("munlocking " + file + " with length " + length);

}

Expand Down
8 changes: 4 additions & 4 deletions src/java/voldemort/store/readonly/io/jna/mman.java
Expand Up @@ -75,7 +75,7 @@ public static void mlock(Pointer addr, long len) throws IOException {
logger.debug(error);
logger.debug(res);
} else {
logger.info("Mlock successfull");
logger.debug("Mlock successfull");

}

Expand All @@ -89,7 +89,7 @@ public static void munlock(Pointer addr, long len) throws IOException {
if(Delegate.munlock(addr, new NativeLong(len)) != 0) {
logger.warn(errno.strerror());
} else {
logger.info("munlocking region");
logger.debug("munlocking region");
}

}
Expand Down Expand Up @@ -123,12 +123,12 @@ public static void main(String[] args) throws Exception {
FileInputStream in = new FileInputStream(file);
int fd = voldemort.store.readonly.io.Native.getFd(in.getFD());

logger.info("File descriptor is: " + fd);
logger.debug("File descriptor is: " + fd);

// mmap a large file...
Pointer addr = mmap(file.length(), PROT_READ, mman.MAP_SHARED | mman.MAP_ALIGN, fd, 0L);

logger.info("mmap address is: " + Pointer.nativeValue(addr));
logger.debug("mmap address is: " + Pointer.nativeValue(addr));

// try to mlock it directly
mlock(addr, file.length());
Expand Down

0 comments on commit a18d91b

Please sign in to comment.