private Fmrc(FeatureCollectionConfig config, Formatter errlog) { this.manager = new MFileCollectionManager(config, errlog, null); this.config = config; }
static public MFileCollectionManager openWithRecheck(String collectionName, String recheckS) { return new MFileCollectionManager(collectionName, recheckS); }
private Fmrc(FeatureCollectionConfig config, Formatter errlog) { this.manager = new MFileCollectionManager(config, errlog, null); this.config = config; }
private Fmrc(FeatureCollectionConfig config, Formatter errlog) { this.manager = new MFileCollectionManager(config, errlog, null); this.config = config; }
static public MFileCollectionManager openWithRecheck(String collectionName, String recheckS) { return new MFileCollectionManager(collectionName, recheckS); }
static public MFileCollectionManager open(String collectionName, String collectionSpec, String olderThan, Formatter errlog) throws IOException { return new MFileCollectionManager(collectionName, collectionSpec, olderThan, errlog); }
static public MFileCollectionManager openWithRecheck(String collectionName, String recheckS) { return new MFileCollectionManager(collectionName, recheckS); }
static public MFileCollectionManager open(String collectionName, String collectionSpec, String olderThan, Formatter errlog) throws IOException { return new MFileCollectionManager(collectionName, collectionSpec, olderThan, errlog); }
static public MFileCollectionManager open(String collectionName, String olderThan, Formatter errlog) throws IOException { if (collectionName.startsWith(CATALOG)) return new CatalogCollectionManager(collectionName); else return new MFileCollectionManager(collectionName, olderThan, errlog); }
protected void makeCollection() { Formatter errlog = new Formatter(); if (config.spec.startsWith(MFileCollectionManager.CATALOG)) { // LOOK CHANGE THIS datasetCollection = new CollectionManagerCatalog(config.name, config.spec, null, errlog); } else { datasetCollection = new MFileCollectionManager(config, errlog, this.logger); } topDirectory = datasetCollection.getRoot(); String errs = errlog.toString(); if (errs.length() > 0) logger.warn("MFileCollectionManager parse error = {} ", errs); }
protected InvDatasetFeatureCollection(InvDatasetImpl parent, String name, String path, FeatureCollectionType fcType, FeatureCollectionConfig config) { super(parent, name, buildCatalogServiceHref( path) ); this.path = path; this.fcType = fcType; this.getLocalMetadataInheritable().setDataType(fcType.getFeatureType()); this.config = config; if (config.gribConfig.latestNamer != null) { this.latestFileName = config.gribConfig.latestNamer; } String collectionName = CollectionManagerAbstract.cleanName(config.name != null ? config.name : name); config.name = collectionName; this.logger = loggerFactory.getLogger("fc."+collectionName); // seperate log file for each feature collection (!!) Formatter errlog = new Formatter(); if (config.spec.startsWith(MFileCollectionManager.CATALOG)) { dcm = new CatalogCollectionManager(config.spec); } else { dcm = new MFileCollectionManager(config, errlog, this.logger); } topDirectory = dcm.getRoot(); this.logger.info("FeatureCollection added = {}", getConfig()); String errs = errlog.toString(); if (errs.length()> 0) logger.warn("MFileCollectionManager parse error = {} ", errs); }
MFileCollectionManager dcm = new MFileCollectionManager(name, mcs, cdate, this.logger); dcm.setDateExtractor(dateExtractor); if (config != null && config.gribConfig != null)
@Test @Ignore("tests fail on jenkins due to file permisssions") public void testScanFromConfig() throws IOException { //public FeatureCollectionConfig(String name, FeatureCollectionType fcType, String spec, String dateFormatMark, String olderThan, String recheckAfter, // String timePartition, String useIndexOnlyS, Element innerNcml) { // public FeatureCollectionConfig(String name, String path, FeatureCollectionType fcType, String spec, // String dateFormatMark, String olderThan, // String timePartition, String useIndexOnlyS, Element innerNcml) { FeatureCollectionConfig config = new FeatureCollectionConfig("testScanFromConfig", "path", FeatureCollectionType.FMRC, TestDir.cdmUnitTestDir + "agg/updating/.*nc$", null, null, "10 sec", null, null); assert touch(TestDir.cdmUnitTestDir + "agg/updating/extra.nc"); // count scanned files Formatter f = new Formatter(System.out); MFileCollectionManager dcm = new MFileCollectionManager(config, f, null); dcm.scan(true); List<MFile> fileList = (List<MFile>) Misc.getList(dcm.getFilesSorted()); assert fileList.size() == 2 : dcm; }