@Override public void updateIndexerInternal(final IndexerDefinition indexer) throws InterruptedException, KeeperException, IndexerNotFoundException, IndexerConcurrentModificationException, IndexerValidityException { assertValid(indexer); final byte[] newData = IndexerDefinitionJsonSerDeser.INSTANCE.toJsonBytes(indexer); try { zk.retryOperation(new ZooKeeperOperation<Stat>() { @Override public Stat execute() throws KeeperException, InterruptedException { return zk.setData(indexerCollectionPathSlash + indexer.getName(), newData, indexer.getOccVersion()); } }); } catch (KeeperException.NoNodeException e) { throw new IndexerNotFoundException(indexer.getName()); } catch (KeeperException.BadVersionException e) { throw new IndexerConcurrentModificationException(indexer.getName()); } }
@Override public void updateIndexerInternal(final IndexerDefinition indexer) throws InterruptedException, KeeperException, IndexerNotFoundException, IndexerConcurrentModificationException, IndexerValidityException { assertValid(indexer); final byte[] newData = IndexerDefinitionJsonSerDeser.INSTANCE.toJsonBytes(indexer); try { zk.retryOperation(new ZooKeeperOperation<Stat>() { @Override public Stat execute() throws KeeperException, InterruptedException { return zk.setData(indexerCollectionPathSlash + indexer.getName(), newData, indexer.getOccVersion()); } }); } catch (KeeperException.NoNodeException e) { throw new IndexerNotFoundException(indexer.getName()); } catch (KeeperException.BadVersionException e) { throw new IndexerConcurrentModificationException(indexer.getName()); } }
|| indexerDef.getLifecycleState() == LifecycleState.DELETING) { throw new IndexerServerException(HttpServletResponse.SC_BAD_REQUEST, new IndexerConcurrentModificationException("Delete of \'" + indexerName + "\' is already in progress"));
if (!oldIndexer.equals(baseIndexer)) { throw new IndexerServerException(HttpServletResponse.SC_BAD_REQUEST, new IndexerConcurrentModificationException( "Base Indexer does not match model, model may have been modified concurrently"));