test_class.declarator: TEST_CURRENT_TIME = 1428151913000L
test_class.modifier: private static final
test_class.original_string: private static final long TEST_CURRENT_TIME = 1428151913000L;
test_class.type: long
test_class.var_name: TEST_CURRENT_TIME
test_class.declarator: tzRule = new TestWatcher() {
  
          private DateTimeZone defaultTz = DateTimeZone.getDefault();
  
          @Override
          protected void starting(Description description) {
              DateTimeZone.setDefault(DateTimeZone.forOffsetHoursMinutes(5, 30));
          }
  
          @Override
          protected void finished(Description description) {
              DateTimeZone.setDefault(defaultTz);
          }
      }
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public TestWatcher tzRule = new TestWatcher() {
  
          private DateTimeZone defaultTz = DateTimeZone.getDefault();
  
          @Override
          protected void starting(Description description) {
              DateTimeZone.setDefault(DateTimeZone.forOffsetHoursMinutes(5, 30));
          }
  
          @Override
          protected void finished(Description description) {
              DateTimeZone.setDefault(defaultTz);
          }
      };
test_class.type: TestWatcher
test_class.var_name: tzRule
test_class.file: real-time/foxtrot/foxtrot-core/src/test/java/com/flipkart/foxtrot/core/querystore/impl/ElasticsearchUtilsTest.java
test_class.identifier: ElasticsearchUtilsTest
test_case.body: @Test
      public void testGetIndicesBetween() throws Exception {
          TestRequest request = new TestRequest();
          BetweenFilter filter = new BetweenFilter();
          filter.setTemporal(true);
          filter.setFrom(1427997600000L); //4/2/2015, 11:30:00 PM IST
          filter.setTo(1428001200000L);   //4/3/2015, 12:30:00 AM IST
          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);
      }
test_case.class_method_signature: ElasticsearchUtilsTest.testGetIndicesBetween()
test_case.full_signature: @Test public void testGetIndicesBetween()
test_case.identifier: testGetIndicesBetween
test_case.invocations: setTemporal setFrom setTo setFilters singletonList getIndices analyze getFilters println toString assertArrayEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetIndicesBetween()
focal_class.declarator: logger = LoggerFactory.getLogger(ElasticsearchUtils.class.getSimpleName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(ElasticsearchUtils.class.getSimpleName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: TYPE_NAME = "document"
focal_class.modifier: public static final
focal_class.original_string: public static final String TYPE_NAME = "document";
focal_class.type: String
focal_class.var_name: TYPE_NAME
focal_class.declarator: TABLENAME_PREFIX = "foxtrot"
focal_class.modifier: public static final
focal_class.original_string: public static final String TABLENAME_PREFIX = "foxtrot";
focal_class.type: String
focal_class.var_name: TABLENAME_PREFIX
focal_class.declarator: TABLENAME_POSTFIX = "table"
focal_class.modifier: public static final
focal_class.original_string: public static final String TABLENAME_POSTFIX = "table";
focal_class.type: String
focal_class.var_name: TABLENAME_POSTFIX
focal_class.declarator: FORMATTER = DateTimeFormat.forPattern("dd-M-yyyy")
focal_class.modifier: private static final
focal_class.original_string: private static final DateTimeFormatter FORMATTER = DateTimeFormat.forPattern("dd-M-yyyy");
focal_class.type: DateTimeFormatter
focal_class.var_name: FORMATTER
focal_class.declarator: DATE_TIME_FORMATTER = DateTimeFormat.forPattern("dd-M-yyyy")
focal_class.modifier: public static final
focal_class.original_string: public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormat.forPattern("dd-M-yyyy");
focal_class.type: DateTimeFormatter
focal_class.var_name: DATE_TIME_FORMATTER
focal_class.declarator: mapper
focal_class.modifier: private static
focal_class.original_string: private static ObjectMapper mapper;
focal_class.type: ObjectMapper
focal_class.var_name: mapper
focal_class.file: real-time/foxtrot/foxtrot-core/src/main/java/com/flipkart/foxtrot/core/querystore/impl/ElasticsearchUtils.java
focal_class.identifier: ElasticsearchUtils
focal_class.class_method_signature: ElasticsearchUtils.setMapper(ObjectMapper mapper)
focal_class.full_signature: public static void setMapper(ObjectMapper mapper)
focal_class.identifier: setMapper
focal_class.modifiers: public static
focal_class.parameters: (ObjectMapper mapper)
focal_class.return: void
focal_class.signature: void setMapper(ObjectMapper mapper)
focal_class.class_method_signature: ElasticsearchUtils.getMapper()
focal_class.full_signature: public static ObjectMapper getMapper()
focal_class.identifier: getMapper
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: ObjectMapper
focal_class.signature: ObjectMapper getMapper()
focal_class.class_method_signature: ElasticsearchUtils.getIndexPrefix(final String table)
focal_class.full_signature: public static String getIndexPrefix(final String table)
focal_class.identifier: getIndexPrefix
focal_class.modifiers: public static
focal_class.parameters: (final String table)
focal_class.return: String
focal_class.signature: String getIndexPrefix(final String table)
focal_class.class_method_signature: ElasticsearchUtils.getIndices(final String table)
focal_class.full_signature: public static String[] getIndices(final String table)
focal_class.identifier: getIndices
focal_class.modifiers: public static
focal_class.parameters: (final String table)
focal_class.return: String[]
focal_class.signature: String[] getIndices(final String table)
focal_class.class_method_signature: ElasticsearchUtils.getIndices(final String table, final ActionRequest request)
focal_class.full_signature: public static String[] getIndices(final String table, final ActionRequest request)
focal_class.identifier: getIndices
focal_class.modifiers: public static
focal_class.parameters: (final String table, final ActionRequest request)
focal_class.return: String[]
focal_class.signature: String[] getIndices(final String table, final ActionRequest request)
focal_class.class_method_signature: ElasticsearchUtils.getIndices(final String table, final ActionRequest request, final Interval interval)
focal_class.full_signature: @VisibleForTesting public static String[] getIndices(final String table, final ActionRequest request, final Interval interval)
focal_class.identifier: getIndices
focal_class.modifiers: @VisibleForTesting public static
focal_class.parameters: (final String table, final ActionRequest request, final Interval interval)
focal_class.return: String[]
focal_class.signature: String[] getIndices(final String table, final ActionRequest request, final Interval interval)
focal_class.class_method_signature: ElasticsearchUtils.getCurrentIndex(final String table, long timestamp)
focal_class.full_signature: public static String getCurrentIndex(final String table, long timestamp)
focal_class.identifier: getCurrentIndex
focal_class.modifiers: public static
focal_class.parameters: (final String table, long timestamp)
focal_class.return: String
focal_class.signature: String getCurrentIndex(final String table, long timestamp)
focal_class.class_method_signature: ElasticsearchUtils.getClusterTemplateMapping(IndicesAdminClient indicesAdminClient)
focal_class.full_signature: public static PutIndexTemplateRequest getClusterTemplateMapping(IndicesAdminClient indicesAdminClient)
focal_class.identifier: getClusterTemplateMapping
focal_class.modifiers: public static
focal_class.parameters: (IndicesAdminClient indicesAdminClient)
focal_class.return: PutIndexTemplateRequest
focal_class.signature: PutIndexTemplateRequest getClusterTemplateMapping(IndicesAdminClient indicesAdminClient)
focal_class.class_method_signature: ElasticsearchUtils.initializeMappings(Client client)
focal_class.full_signature: public static void initializeMappings(Client client)
focal_class.identifier: initializeMappings
focal_class.modifiers: public static
focal_class.parameters: (Client client)
focal_class.return: void
focal_class.signature: void initializeMappings(Client client)
focal_class.class_method_signature: ElasticsearchUtils.getValidTableName(String table)
focal_class.full_signature: public static String getValidTableName(String table)
focal_class.identifier: getValidTableName
focal_class.modifiers: public static
focal_class.parameters: (String table)
focal_class.return: String
focal_class.signature: String getValidTableName(String table)
focal_class.class_method_signature: ElasticsearchUtils.isIndexValidForTable(String index, String table)
focal_class.full_signature: public static boolean isIndexValidForTable(String index, String table)
focal_class.identifier: isIndexValidForTable
focal_class.modifiers: public static
focal_class.parameters: (String index, String table)
focal_class.return: boolean
focal_class.signature: boolean isIndexValidForTable(String index, String table)
focal_class.class_method_signature: ElasticsearchUtils.isIndexEligibleForDeletion(String index, Table table)
focal_class.full_signature: public static boolean isIndexEligibleForDeletion(String index, Table table)
focal_class.identifier: isIndexEligibleForDeletion
focal_class.modifiers: public static
focal_class.parameters: (String index, Table table)
focal_class.return: boolean
focal_class.signature: boolean isIndexEligibleForDeletion(String index, Table table)
focal_class.class_method_signature: ElasticsearchUtils.getTableNameFromIndex(String currentIndex)
focal_class.full_signature: public static String getTableNameFromIndex(String currentIndex)
focal_class.identifier: getTableNameFromIndex
focal_class.modifiers: public static
focal_class.parameters: (String currentIndex)
focal_class.return: String
focal_class.signature: String getTableNameFromIndex(String currentIndex)
focal_method.body: public static String[] getIndices(final String table) {
          /*long currentTime = new Date().getTime();
          String names[] = new String[30]; //TODO::USE TABLE METADATA
          for(int i = 0 ; i < 30; i++) {
              String postfix = new SimpleDateFormat("dd-M-yyyy").format(new Date(currentTime));
              names[i] = String.format("%s-%s-%s", TABLENAME_PREFIX, table, postfix);
          }*/
          return new String[]{String.format("%s-%s-%s-*",
                  ElasticsearchUtils.TABLENAME_PREFIX, table, ElasticsearchUtils.TABLENAME_POSTFIX)};
      }
focal_method.class_method_signature: ElasticsearchUtils.getIndices(final String table)
focal_method.full_signature: public static String[] getIndices(final String table)
focal_method.identifier: getIndices
focal_method.invocations: format
focal_method.modifiers: public static
focal_method.parameters: (final String table)
focal_method.return: String[]
focal_method.signature: String[] getIndices(final String table)