accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1333071 - in /accumulo/branches/1.4: ./ src/ src/core/ src/server/ src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
Date Wed, 02 May 2012 14:56:23 GMT
Author: ecn
Date: Wed May  2 14:56:23 2012
New Revision: 1333071

URL: http://svn.apache.org/viewvc?rev=1333071&view=rev
Log:
ACCUMULO-49 merge to 1.4

Modified:
    accumulo/branches/1.4/   (props changed)
    accumulo/branches/1.4/src/   (props changed)
    accumulo/branches/1.4/src/core/   (props changed)
    accumulo/branches/1.4/src/server/   (props changed)
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java

Propchange: accumulo/branches/1.4/
------------------------------------------------------------------------------
  Merged /accumulo/trunk:r1333070

Propchange: accumulo/branches/1.4/src/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src:r1333070

Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src/core:r1333070

Propchange: accumulo/branches/1.4/src/server/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src/server:r1333070
  Merged /accumulo/trunk/server:r1333070

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java?rev=1333071&r1=1333070&r2=1333071&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
Wed May  2 14:56:23 2012
@@ -158,13 +158,15 @@ public class Accumulo {
       @Override
       public void run() {
         try {
-          File swappiness = new File("/proc/sys/vm/swappiness");
+          String procFile = "/proc/sys/vm/swappiness";
+          File swappiness = new File(procFile);
           if (swappiness.exists() && swappiness.canRead()) {
-            InputStream is = new FileInputStream("/proc/sys/vm/swappiness");
+            InputStream is = new FileInputStream(procFile);
             try {
               byte[] buffer = new byte[10];
               int bytes = is.read(buffer);
               String setting = new String(buffer, 0, bytes);
+              setting = setting.trim();
               if (bytes > 0 && Integer.parseInt(setting) > 0) {
                 log.warn("System swappiness setting is greater than zero (" + setting + ")
which can cause time-sensitive operations to be delayed. "
                     + " Accumulo is time sensitive because it needs to maintain distributed
lock agreement.");



Mime
View raw message