test_class.declarator: cluster
test_class.modifier: private
test_class.original_string: private EmbeddedCluster cluster;
test_class.type: EmbeddedCluster
test_class.var_name: cluster
test_class.declarator: stream = new InMemoryWriter(System.out)
test_class.modifier: private
test_class.original_string: private InMemoryWriter stream = new InMemoryWriter(System.out);
test_class.type: InMemoryWriter
test_class.var_name: stream
test_class.declarator: map = new HashMap<String, String>()
test_class.modifier: private
test_class.original_string: private Map<String, String> map = new HashMap<String, String>();
test_class.type: Map<String, String>
test_class.var_name: map
test_class.file: retention/src/test/java/org/apache/ivory/retention/FeedEvictorTest.java
test_class.identifier: FeedEvictorTest
test_case.body: @Test
  	public void testEviction2() throws Exception {
  		try {
  			Configuration conf = cluster.getConf();
  			FileSystem fs = FileSystem.get(conf);
  			fs.delete(new Path("/"), true);
  			stream.clear();
  
  			Pair<List<String>, List<String>>  pair;
  			pair = createTestData("feed1", "yyyy-MM-dd/'more'/yyyy", 10, TimeUnit.DAYS,"/data");
  			String dataPath = "/data/YYYY/feed1/mmHH/dd/MM/?{YEAR}-?{MONTH}-?{DAY}/more/?{YEAR}";
  			String logFile = "/ivory/staging/feed/instancePaths-2012-01-01-01-00.csv";
  
  			FeedEvictor.main(new String[] {
  					"-feedBasePath",cluster.getConf().get("fs.default.name")
  					+ dataPath,
  					"-retentionType","instance", "-retentionLimit","days(10)", "-timeZone","UTC", "-frequency","daily",
  					"-logFile",logFile});
  
  			assertFailures(fs, pair);
  			compare(map.get("feed1"), stream.getBuffer());
  
  			Assert.assertEquals(readLogFile(new Path(logFile)), getExpectedInstancePaths(dataPath));
  
  
  		} catch (Exception e) {
  			Assert.fail("Unknown exception", e);
  		}
  	}
test_case.class_method_signature: FeedEvictorTest.testEviction2()
test_case.full_signature: @Test public void testEviction2()
test_case.identifier: testEviction2
test_case.invocations: getConf get delete clear createTestData main get getConf assertFailures compare get getBuffer assertEquals readLogFile getExpectedInstancePaths fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEviction2()
focal_class.declarator: LOG = Logger.getLogger(FeedEvictor.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger LOG = Logger.getLogger(FeedEvictor.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: EVALUATOR = new
              ExpressionEvaluatorImpl()
focal_class.modifier: private static final
focal_class.original_string: private static final ExpressionEvaluator EVALUATOR = new
              ExpressionEvaluatorImpl();
focal_class.type: ExpressionEvaluator
focal_class.var_name: EVALUATOR
focal_class.declarator: resolver = ExpressionHelper.get()
focal_class.modifier: private static final
focal_class.original_string: private static final ExpressionHelper resolver = ExpressionHelper.get();
focal_class.type: ExpressionHelper
focal_class.var_name: resolver
focal_class.declarator: stream = System.out
focal_class.modifier: static
focal_class.original_string: static PrintStream stream = System.out;
focal_class.type: PrintStream
focal_class.var_name: stream
focal_class.declarator: format = "yyyyMMddHHmm"
focal_class.modifier: private static final
focal_class.original_string: private static final String format = "yyyyMMddHHmm";
focal_class.type: String
focal_class.var_name: format
focal_class.declarator: fs
focal_class.modifier: private
focal_class.original_string: private FileSystem fs;
focal_class.type: FileSystem
focal_class.var_name: fs
focal_class.declarator: map = new TreeMap<VARS, String>()
focal_class.modifier: private
focal_class.original_string: private Map<VARS, String> map = new TreeMap<VARS, String>();
focal_class.type: Map<VARS, String>
focal_class.var_name: map
focal_class.declarator: instancePaths = new StringBuffer("instancePaths=")
focal_class.modifier: private final
focal_class.original_string: private final StringBuffer instancePaths = new StringBuffer("instancePaths=");
focal_class.type: StringBuffer
focal_class.var_name: instancePaths
focal_class.declarator: buffer = new StringBuffer()
focal_class.modifier: private final
focal_class.original_string: private final StringBuffer buffer = new StringBuffer();
focal_class.type: StringBuffer
focal_class.var_name: buffer
focal_class.file: retention/src/main/java/org/apache/ivory/retention/FeedEvictor.java
focal_class.identifier: FeedEvictor
focal_class.interfaces: implements Tool
focal_class.class_method_signature: FeedEvictor.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_class.class_method_signature: FeedEvictor.run(String[] args)
focal_class.full_signature: @Override public int run(String[] args)
focal_class.identifier: run
focal_class.modifiers: @Override public
focal_class.parameters: (String[] args)
focal_class.return: int
focal_class.signature: int run(String[] args)
focal_class.class_method_signature: FeedEvictor.evictor(String feedBasePath, String retentionType,
  			String retentionLimit, String timeZone, String frequency,
  			String logFile)
focal_class.full_signature: private void evictor(String feedBasePath, String retentionType,
  			String retentionLimit, String timeZone, String frequency,
  			String logFile)
focal_class.identifier: evictor
focal_class.modifiers: private
focal_class.parameters: (String feedBasePath, String retentionType,
  			String retentionLimit, String timeZone, String frequency,
  			String logFile)
focal_class.return: void
focal_class.signature: void evictor(String feedBasePath, String retentionType,
  			String retentionLimit, String timeZone, String frequency,
  			String logFile)
focal_class.class_method_signature: FeedEvictor.logInstancePaths(Path path, String instancePaths)
focal_class.full_signature: private void logInstancePaths(Path path, String instancePaths)
focal_class.identifier: logInstancePaths
focal_class.modifiers: private
focal_class.parameters: (Path path, String instancePaths)
focal_class.return: void
focal_class.signature: void logInstancePaths(Path path, String instancePaths)
focal_class.class_method_signature: FeedEvictor.getDateRange(String period)
focal_class.full_signature: private Pair<Date, Date> getDateRange(String period)
focal_class.identifier: getDateRange
focal_class.modifiers: private
focal_class.parameters: (String period)
focal_class.return: Pair<Date, Date>
focal_class.signature: Pair<Date, Date> getDateRange(String period)
focal_class.class_method_signature: FeedEvictor.discoverInstanceToDelete(String inPath, String timeZone,
                                                  String dateMask, Date start)
focal_class.full_signature: private List<Path> discoverInstanceToDelete(String inPath, String timeZone,
                                                  String dateMask, Date start)
focal_class.identifier: discoverInstanceToDelete
focal_class.modifiers: private
focal_class.parameters: (String inPath, String timeZone,
                                                  String dateMask, Date start)
focal_class.return: List<Path>
focal_class.signature: List<Path> discoverInstanceToDelete(String inPath, String timeZone,
                                                  String dateMask, Date start)
focal_class.class_method_signature: FeedEvictor.getDateFormatInPath(String inPath)
focal_class.full_signature: private String getDateFormatInPath(String inPath)
focal_class.identifier: getDateFormatInPath
focal_class.modifiers: private
focal_class.parameters: (String inPath)
focal_class.return: String
focal_class.signature: String getDateFormatInPath(String inPath)
focal_class.class_method_signature: FeedEvictor.findFilesForFeed(String feedBasePath)
focal_class.full_signature: private FileStatus[] findFilesForFeed(String feedBasePath)
focal_class.identifier: findFilesForFeed
focal_class.modifiers: private
focal_class.parameters: (String feedBasePath)
focal_class.return: FileStatus[]
focal_class.signature: FileStatus[] findFilesForFeed(String feedBasePath)
focal_class.class_method_signature: FeedEvictor.extractDatePartFromPathMask(String mask, String inPath)
focal_class.full_signature: private String extractDatePartFromPathMask(String mask, String inPath)
focal_class.identifier: extractDatePartFromPathMask
focal_class.modifiers: private
focal_class.parameters: (String mask, String inPath)
focal_class.return: String
focal_class.signature: String extractDatePartFromPathMask(String mask, String inPath)
focal_class.class_method_signature: FeedEvictor.getDate(Path file, String inMask,
                           String dateMask, String timeZone)
focal_class.full_signature: private Date getDate(Path file, String inMask,
                           String dateMask, String timeZone)
focal_class.identifier: getDate
focal_class.modifiers: private
focal_class.parameters: (Path file, String inMask,
                           String dateMask, String timeZone)
focal_class.return: Date
focal_class.signature: Date getDate(Path file, String inMask,
                           String dateMask, String timeZone)
focal_class.class_method_signature: FeedEvictor.populateDatePartMap(String path, String mask)
focal_class.full_signature: private void populateDatePartMap(String path, String mask)
focal_class.identifier: populateDatePartMap
focal_class.modifiers: private
focal_class.parameters: (String path, String mask)
focal_class.return: void
focal_class.signature: void populateDatePartMap(String path, String mask)
focal_class.class_method_signature: FeedEvictor.isDateInRange(Date date, Date start)
focal_class.full_signature: private boolean isDateInRange(Date date, Date start)
focal_class.identifier: isDateInRange
focal_class.modifiers: private
focal_class.parameters: (Date date, Date start)
focal_class.return: boolean
focal_class.signature: boolean isDateInRange(Date date, Date start)
focal_class.class_method_signature: FeedEvictor.deleteInstance(Path path)
focal_class.full_signature: private boolean deleteInstance(Path path)
focal_class.identifier: deleteInstance
focal_class.modifiers: private
focal_class.parameters: (Path path)
focal_class.return: boolean
focal_class.signature: boolean deleteInstance(Path path)
focal_class.class_method_signature: FeedEvictor.debug(Path outPath, FileSystem fs)
focal_class.full_signature: private void debug(Path outPath, FileSystem fs)
focal_class.identifier: debug
focal_class.modifiers: private
focal_class.parameters: (Path outPath, FileSystem fs)
focal_class.return: void
focal_class.signature: void debug(Path outPath, FileSystem fs)
focal_class.class_method_signature: FeedEvictor.getCommand(String[] args)
focal_class.full_signature: private CommandLine getCommand(String[] args)
focal_class.identifier: getCommand
focal_class.modifiers: private
focal_class.parameters: (String[] args)
focal_class.return: CommandLine
focal_class.signature: CommandLine getCommand(String[] args)
focal_class.superclass: extends Configured
focal_method.body: public static void main(String[] args) throws Exception {
          Configuration conf = new Configuration();
          Path confPath = new Path("file:///" + System.getProperty("oozie.action.conf.xml"));
  
          LOG.info(confPath + " found ? " +
                  confPath.getFileSystem(conf).exists(confPath));
          conf.addResource(confPath);
          int ret = ToolRunner.run(conf, new FeedEvictor(), args);
          if (ret != 0) {
              throw new Exception("Unable to perform eviction action args: " +
                      Arrays.toString(args));
          }
      }
focal_method.class_method_signature: FeedEvictor.main(String[] args)
focal_method.full_signature: public static void main(String[] args)
focal_method.identifier: main
focal_method.invocations: getProperty info exists getFileSystem addResource run toString
focal_method.modifiers: public static
focal_method.parameters: (String[] args)
focal_method.return: void
focal_method.signature: void main(String[] args)