Beispiel #1
0
        private void _Write(TStoreUri uri)
        {
            // special case writing a tstore.  If we're not sorted sort our bad selves
            if (uri.StorageType == TStorageType.TStore &&
                InternalSource.Sorting.IsSorted == false) {
                SortReduce(true, false);
            }

            if (Processor._logFile != null) {
                Console.Error.WriteLine("[Process Tree]");
                InternalSource.ProcessTreeComment += " --> [" + uri.StorageType + ":" + uri.FilePath + "]";
                InternalSource.PrintProcessTree(0);
            }

            RecordOutputter outputter = new RecordOutputter(uri);
            outputter.SetInput(InternalSource);
            outputter.TStoreGroupSize = Processor.TStoreGroupSize;
            outputter.SuppressTableHeaders = Processor.SuppressTableHeaders;
            outputter.Write();
            InternalSource.Close();
        }
Beispiel #2
0
        private void _ProcessClusterOutput(ArrayList nebulaOutputFiles)
        {
            if (_outputUri.FilePath.StartsWith("cosmos://")) {
                return; // we do nothing because it's all processed and taken
                // care of on the cluster.
            }

            // else we're pulling the output from the cluster to the client

            // nebula's filtered output is a list of our input files to aggregate
            string[] inFiles = (string[]) nebulaOutputFiles.ToArray(typeof(string));

            RecordAggregator aggregator = new RecordAggregator(_recordInstance, inFiles);
            aggregator.ReductionEnabled = _reductionEnabled;

            // outputDir is local
            RecordOutputter outputter = new RecordOutputter(_outputUri, _recordInstance);
            outputter.Input = aggregator;
            outputter.Write();
        }