chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1037384 - /incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java
Date Sun, 21 Nov 2010 05:19:25 GMT
Author: eyang
Date: Sun Nov 21 05:19:25 2010
New Revision: 1037384

URL: http://svn.apache.org/viewvc?rev=1037384&view=rev
Log:
CHUKWA-543.  Parse only .view files for processing user view files.  (Eric Yang)

Modified:
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java

Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java?rev=1037384&r1=1037383&r2=1037384&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java (original)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java Sun
Nov 21 05:19:25 2010
@@ -208,6 +208,9 @@ public class ViewStore {
         FileStatus[] fstatus = fs.listStatus(viewFile);
         if(fstatus!=null) {
           for(int i=0;i<fstatus.length;i++) {
+            if(!fstatus[i].getPath().getName().endsWith(".view")) {
+              continue;
+            }
             long size = fstatus[i].getLen();
             FSDataInputStream viewStream = fs.open(fstatus[i].getPath());
             byte[] buffer = new byte[(int)size];



Mime
View raw message