Removing an IMDC with the API - Aster Execution Engine

Teradata Aster® Developer Guide

Product
Aster Execution Engine
Release Number
7.00.02
Published
July 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
xnl1494366523182.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
ffu1489104705746
lifecycle
previous
Product Category
Software
To remove an IMDC, use the method InMemoryDataCollectionRepository::removeInMemoryDataCollection, specifying the IMDC name.
You cannot remove an IMDC during contract negotiation.
  • Call the method InMemoryDataCollectionRepository::removeInMemoryDataCollection:
    import java.util.List;
    import java.util.ArrayList;
    import com.asterdata.ncluster.sqlmr.RowFunction;
    import com.asterdata.ncluster.sqlmr.data.RowEmitter;
    import com.asterdata.ncluster.sqlmr.data.RowIterator;
    import com.asterdata.ncluster.sqlmr.InMemoryDataCollectionRepository;
    import com.asterdata.ncluster.sqlmr.data.InMemoryDataCollection;
    import com.asterdata.ncluster.sqlmr.InMemoryDataCollectionDoesNotExistException;
    ...
      public void operateOnSomeRows(RowIterator inputIterator,
                                    outputEmitter)
      { 
        ...
        try
        {
           //Remove IMDC "IMDC_name"
           //Throws InMemoryDataCollectionDoesNotExistException if IMDC is not found
           InMemoryDataCollectionRepository.removeInMemoryDataCollection("IMDC_name");
        }
        catch(InMemoryDataCollectionDoesNotExistException nonExistentIMDCEx){
      }
      ...
     }
    
Now the IMDC is nonexistent.