@Test public void testDatePartitionerGetPartition(){ DatePartitioner d = new DatePartitioner("yy/MM/dd"); String year = Integer.toString(Calendar.getInstance().get(Calendar.YEAR)).substring(2); String month = Integer.toString(Calendar.getInstance().get(Calendar.MONTH)+1); String day = Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)); if(day.length() == 1){ day = "0"+day; } assertEquals(year+"/"+month+"/"+day,d.getPartition()); }
@Override public String getPartition() { return f.format(new Date()); }
DatePartitioner extends AbstractPartitioner { @Override public String getPartition() { return f.format(new Date()); } }
DatePartitioner extends AbstractPartitioner { @Override public String getPartition() { return f.format(new Date()); } DatePartitioner(String format); }
DatePartitioner extends AbstractPartitioner { @Override public String getPartition() { return f.format(new Date()); } DatePartitioner(String format); @Override String getPartition(); @Override Date getRefresh(); }
DatePartitioner extends AbstractPartitioner { @Override public String getPartition() { return f.format(new Date()); } DatePartitioner(String format); @Override String getPartition(); @Override Date getRefresh();  }