@Test public void testGetIndicesBetween() throws Exception { TestRequest request = new TestRequest(); BetweenFilter filter = new BetweenFilter(); filter.setTemporal(true); filter.setFrom(1427997600000L); filter.setTo(1428001200000L); request.setFilters(Collections.<Filter>singletonList(filter)); String indexes[] = ElasticsearchUtils.getIndices("test", request, new PeriodSelector(request.getFilters()).analyze(TEST_CURRENT_TIME) ); System.out.println(Arrays.toString(indexes)); Assert.assertArrayEquals(new String[]{"foxtrot-test-table-02-4-2015", "foxtrot-test-table-03-4-2015"}, indexes); }
public static String getIndices(final String table) { return String.format("%s-%s-%s-*", getTableNamePrefix(), table, ElasticsearchUtils.TABLENAME_POSTFIX); }
ElasticsearchUtils { public static String getIndices(final String table) { return String.format("%s-%s-%s-*", getTableNamePrefix(), table, ElasticsearchUtils.TABLENAME_POSTFIX); } }
ElasticsearchUtils { public static String getIndices(final String table) { return String.format("%s-%s-%s-*", getTableNamePrefix(), table, ElasticsearchUtils.TABLENAME_POSTFIX); } private  ElasticsearchUtils(); }
ElasticsearchUtils { public static String getIndices(final String table) { return String.format("%s-%s-%s-*", getTableNamePrefix(), table, ElasticsearchUtils.TABLENAME_POSTFIX); } private  ElasticsearchUtils(); @VisibleForTesting static String getTableNamePrefix(); static void setTableNamePrefix(ElasticsearchConfig config); static String getIndices(final String table); static String[] getIndices(final String table, final ActionRequest request); @VisibleForTesting static String[] getIndices(final String table, final ActionRequest request, final Interval interval); static String getCurrentIndex(final String table, long timestamp); static PutIndexTemplateRequest getClusterTemplateMapping(); static void initializeMappings(Client client); static String getValidTableName(String table); static DateTime parseIndexDate(String index, String table); static String getTableNameFromIndex(String currentIndex); static String getTodayIndicesPattern(); static boolean isTimeFilterPresent(List<Filter> filters); }
ElasticsearchUtils { public static String getIndices(final String table) { return String.format("%s-%s-%s-*", getTableNamePrefix(), table, ElasticsearchUtils.TABLENAME_POSTFIX); } private  ElasticsearchUtils(); @VisibleForTesting static String getTableNamePrefix(); static void setTableNamePrefix(ElasticsearchConfig config); static String getIndices(final String table); static String[] getIndices(final String table, final ActionRequest request); @VisibleForTesting static String[] getIndices(final String table, final ActionRequest request, final Interval interval); static String getCurrentIndex(final String table, long timestamp); static PutIndexTemplateRequest getClusterTemplateMapping(); static void initializeMappings(Client client); static String getValidTableName(String table); static DateTime parseIndexDate(String index, String table); static String getTableNameFromIndex(String currentIndex); static String getTodayIndicesPattern(); static boolean isTimeFilterPresent(List<Filter> filters); static final String DOCUMENT_TYPE_NAME; static final String DOCUMENT_META_FIELD_NAME; static final String DOCUMENT_META_TIMESTAMP_FIELD_NAME; static final String TIME_FIELD; static final int DEFAULT_SUB_LIST_SIZE; }