Class DuplicateCommands

All Implemented Interfaces:
org.apache.karaf.shell.api.action.Action
Direct Known Subclasses:
ReplicateCommand

public abstract class DuplicateCommands extends CqlCommands
  • Field Details

    • MAX_BATCH_SIZE

      protected static final int MAX_BATCH_SIZE
      See Also:
    • ingestedCount

      protected AtomicInteger ingestedCount
    • failedCount

      protected AtomicInteger failedCount
    • failedMetacards

      protected Set<ddf.catalog.data.Metacard> failedMetacards
    • start

      protected long start
  • Constructor Details

    • DuplicateCommands

      public DuplicateCommands()
  • Method Details

    • duplicateInBatches

      protected void duplicateInBatches(CatalogFacade queryFacade, CatalogFacade ingestFacade, org.geotools.api.filter.Filter filter, String sourceId) throws InterruptedException
      In batches, loops through a query of the queryFacade and an ingest to the ingestFacade of the metacards from the response until there are no more metacards from the queryFacade or the maxMetacards has been reached.
      Parameters:
      queryFacade - - the CatalogFacade to duplicate from
      ingestFacade - - the CatalogFacade to duplicate to
      filter - - the filter to query with
      Throws:
      InterruptedException
    • ingestMetacards

      protected List<ddf.catalog.data.Metacard> ingestMetacards(CatalogFacade provider, List<ddf.catalog.data.Metacard> metacards)
    • subtract

      protected List<ddf.catalog.data.Metacard> subtract(List<ddf.catalog.data.Metacard> queried, List<ddf.catalog.data.Metacard> ingested)
    • writeFailedMetacards

      protected void writeFailedMetacards(Set<ddf.catalog.data.Metacard> failedMetacardsToWrite) throws IOException
      Throws:
      IOException