accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1494372 - /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
Date Tue, 18 Jun 2013 23:21:12 GMT
Author: billie
Date: Tue Jun 18 23:21:12 2013
New Revision: 1494372

URL: http://svn.apache.org/r1494372
Log:
ACCUMULO-1501 added age-off filter to trace table

Modified:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java?rev=1494372&r1=1494371&r2=1494372&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
Tue Jun 18 23:21:12 2013
@@ -28,6 +28,7 @@ import org.apache.accumulo.core.client.B
 import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties;
@@ -37,6 +38,7 @@ import org.apache.accumulo.core.conf.Pro
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.file.FileUtil;
+import org.apache.accumulo.core.iterators.user.AgeOffFilter;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.trace.TraceFormatter;
 import org.apache.accumulo.core.util.AddressUtil;
@@ -185,6 +187,9 @@ public class TraceServer implements Watc
         connector = serverConfiguration.getInstance().getConnector(principal, at);
         if (!connector.tableOperations().exists(table)) {
           connector.tableOperations().create(table);
+          IteratorSetting setting = new IteratorSetting(10, "ageoff", AgeOffFilter.class.getName());
+          AgeOffFilter.setTTL(setting, 7 * 24 * 60 * 60 * 1000l);
+          connector.tableOperations().attachIterator(table, setting);
         }
         connector.tableOperations().setProperty(table, Property.TABLE_FORMATTER_CLASS.getKey(),
TraceFormatter.class.getName());
         break;



Mime
View raw message