Package com.ngdata.hbaseindexer.model.api

Examples of com.ngdata.hbaseindexer.model.api.IndexerDefinition


        // Check if 1 record and not 2 are in the index
        QueryResponse response = solrServer.query(new SolrQuery("field1:test2*"));
        assertEquals(1, response.getResults().size());
        assertEquals("USER." + assertId, response.getResults().get(0).getFieldValue("lily.id"));
        // check that  the last used batch index conf = default
        IndexerDefinition index = model.getIndexer(INDEX_NAME);

        assertTrue(Lists.newArrayList(index.getLastBatchBuildInfo().getBatchIndexCliArguments())
                .containsAll(Lists.newArrayList(defaultConf)));
    }
View Full Code Here


        try {
            // Now wait until its finished
            long tryUntil = System.currentTimeMillis() + timeout;
            while (System.currentTimeMillis() < tryUntil) {
                Thread.sleep(100);
                IndexerDefinition definition = model.getIndexer(INDEX_NAME);
                if (definition.getBatchIndexingState() == IndexerDefinition.BatchIndexingState.INACTIVE) {
                    Long amountFailed = null;
                    //amountFailed = definition.getLastBatchBuildInfo().getCounters().get(COUNTER_NUM_FAILED_RECORDS);
                    boolean successFlag = definition.getLastBatchBuildInfo().isFinishedSuccessful();
                    indexSuccess = successFlag && (amountFailed == null || amountFailed == 0L);
                    if (!indexSuccess) {
                        fail("Batch index build did not finish successfully: success flag = " +
                                successFlag + ", amount failed records = " + amountFailed + ", job url = " +
                                definition.getLastBatchBuildInfo().getMapReduceJobTrackingUrls());
                    } else {
                        break;
                    }
                }
            }
View Full Code Here

TOP

Related Classes of com.ngdata.hbaseindexer.model.api.IndexerDefinition

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.