### Question:
ArchonStorage { public void clearIndexing(String shardID) throws Exception{ PreparedStatement stmt = null; try { stmt = connection.prepareStatement(clearIndexingStatement); stmt.setString(1, "NEW"); stmt.setNull(2,Types.BIGINT); stmt.setInt(3, Integer.parseInt(shardID)); stmt.setString(4, "RUNNING"); int updated = stmt.executeUpdate(); log.info("Cleared indexing for shardId:"+shardID +" Number of arcfiles changed status:"+updated); } catch (Exception e) { log.error("SQL Exception in clearIndexing:" + e.getMessage()); throw e; } finally { closeStatement(stmt); } } ArchonStorage(); static void initialize(String driverName, String driverUrl, String userName, String password); int nextShardId(); void addARC(String arcPath); void addOrUpdateARC(String arcPath); List<String> getShardIDs(); String nextARC(String shardID); List<String> getARCFiles(String shardID); ArcVO getArcByID(String arcID); int getArcCount(); List<ArcVO> getLatest1000Arcs(); List<ArcVO> getAllRunningArcs(); void setARCState(String arcPath, ArchonConnector.ARC_STATE arcState); void setShardState(String shardID, ArchonConnector.ARC_STATE state, int priority); void setARCProperties(String fullPath, String shardID,ArchonConnector.ARC_STATE state, int priority); void setARCPriority(String fullPath, int priority); void resetArcWithPriorityStatement(String fullPath, int priority); void removeARC(String arcID); void clearIndexing(String shardID); void resetShardId(String shardID); void commit(); void rollback(); void close(); static void shutdown(); static Date INITDATE; }### Answer:
@Test public void testClearIndexing() throws Exception { storage.addARC(arcFile1); storage.addARC(arcFile2); storage.setARCProperties(arcFile1, "1", ArchonConnector.ARC_STATE.RUNNING, 9); storage.setARCProperties(arcFile2, "1", ArchonConnector.ARC_STATE.RUNNING, 9); storage.clearIndexing("1"); ArcVO arc1 = storage.getArcByID("arcfile1"); ArcVO arc2 = storage.getArcByID("arcfile2"); assertEquals("NEW",arc1.getArcState()); assertEquals("NEW",arc2.getArcState()); assertEquals(null,arc1.getShardId()); }