Package com.taobao.top.analysis.util

Examples of com.taobao.top.analysis.util.AnalyzerFilenameFilter


        if (path.startsWith("file:"))
            resource = new File(path.substring("file:".length()));
        else if(path.startsWith("dir:")) {
            resource = new File(path.substring("dir:".length()));
            if (resource.isDirectory()) {
                File[] fs = resource.listFiles(new AnalyzerFilenameFilter(".xml"));

                for (File f : fs) {
                    files.put(f.getName(), f.getName());
                }
            }
View Full Code Here


     * @return
     */
    public boolean isModify() {

        if (resource.isDirectory()) {
            File[] fs = resource.listFiles(new AnalyzerFilenameFilter(".xml"));
            if(fs.length != files.size())
                return true;

            for (File f : fs) {
                if ((f.lastModified() > lastLoadTime) || (files.get(f.getName()) == null)) {
View Full Code Here

        }

        files.clear();

        if (resource.isDirectory()) {
            File[] fs = resource.listFiles(new AnalyzerFilenameFilter(".xml"));

            for (File f : fs) {
                files.put(f.getName(), f.getName());
            }
        }
View Full Code Here

    {
      logger.error(destDir + " dir not exist! loadBackupData fail.");
      return;
    }
   
    File[] bckfiles = dest.listFiles(new AnalyzerFilenameFilter(AnalysisConstants.IBCK_DATAFILE_SUFFIX));
    File backupData = null;
   
    for(File bf : bckfiles)
    {
      if (bf.getName().endsWith(new StringBuilder("-").append(bckPrefix)
View Full Code Here

   
    String _fileSuffix = AnalysisConstants.INNER_DATAFILE_SUFFIX;
    String _bckSuffix = AnalysisConstants.IBCK_DATAFILE_SUFFIX;
   
   
    File[] files = dest.listFiles(new AnalyzerFilenameFilter(_fileSuffix));
    File[] bckfiles = dest.listFiles(new AnalyzerFilenameFilter(_bckSuffix));
    FileComparator c = new FileComparator();
    Arrays.sort(bckfiles, c);
    if (files.length + bckfiles.length == 0)
      return null;
   
View Full Code Here

   
    String _fileSuffix = AnalysisConstants.INNER_DATAFILE_SUFFIX;
    String _bckSuffix = AnalysisConstants.IBCK_DATAFILE_SUFFIX;
   
   
    File[] files = dest.listFiles(new AnalyzerFilenameFilter(_fileSuffix));
    File[] bckfiles = dest.listFiles(new AnalyzerFilenameFilter(_bckSuffix));
   
    if (files.length + bckfiles.length == 0)
      return;
   
    File[] totalFiles = new File[files.length + bckfiles.length];
View Full Code Here

            oldDataKeepMinutes = config.getOldDataKeepMinutes();
         
          long checkTimeLine = System.currentTimeMillis() - oldDataKeepMinutes * 60 * 1000;
         
          File tmpDir = new File(destDir);
          File[] bckFiles = tmpDir.listFiles(new AnalyzerFilenameFilter(_bckSuffix));
         
          for(File f : bckFiles)
          {
            if (f.lastModified() < checkTimeLine)
              f.delete();
View Full Code Here

    Assert.assertEquals(1,resultPools.size());
    Assert.assertEquals("value4", resultPools.get(0).get("entry1").get("key4"));
   
    File destDir = new File("resultPool.tmp");
   
    File[] files = destDir.listFiles(new AnalyzerFilenameFilter(AnalysisConstants.TEMP_MASTER_DATAFILE_SUFFIX));
   
    resultPools = JobDataOperation.load(new File("D:\\tmp\\2012-7-16-tip-10.246.146.70-15-5.ibck"), true, job, false);
   
    System.out.println(files[0].getName().substring(files[0].getName().indexOf(AnalysisConstants.SPLIT_KEY)+AnalysisConstants.SPLIT_KEY.length()
        ,files[0].getName().indexOf(AnalysisConstants.TEMP_MASTER_DATAFILE_SUFFIX)));
View Full Code Here

        if (configs != null) {
            for (String config : configs) {
                if (config.startsWith("dir:")) {
                    File[] files =
                            new File(config.substring(config.indexOf("dir:") + "dir:".length()))
                                .listFiles(new AnalyzerFilenameFilter(".xml"));
                    if(files == null) {
                        logger.error("please have a check at " + config);
                    }
                    for (File file : files) {
                        this.buildReportModule(new StringBuilder("file:").append(file.getAbsolutePath()).toString(),
View Full Code Here

TOP

Related Classes of com.taobao.top.analysis.util.AnalyzerFilenameFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.