Esempio n. 1
0
 public RecordOutputter(TStoreUri outputUri)
 {
     _outputUri = outputUri;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates a record source out of 3 possible input types:
        /// 1) A searchable TStore using protocol "store:" e.g. store:foo
        /// 2) A streamable RecordsFile using protocol "recs:" e.g. recs: foobar
        /// 3) A streamable FlatFile using no protocol e.g. flatfile
        /// </summary>
        /// <param name="inputUri">the uri of the input</param>
        /// <returns>A RecordSource for further processing</returns>
        public RecordSource Input(string inputUri)
        {
            TStoreUri uri = new TStoreUri(inputUri);

            TStoreInputType inputType = (TStoreInputType)uri.StorageType;
            return Input(inputType, uri.FilePath);
        }
Esempio n. 3
0
 /// <summary>
 /// Writes the record source.
 /// </summary>
 /// <param name="outputType">The type of output either TStore, RecordsFile or FlatFile</param>
 /// <param name="pathInfo">The disk path of the output</param>
 public void Write(TStoreOutputType outputType, string pathInfo)
 {
     TStoreUri uri = new TStoreUri((TStorageType)outputType, pathInfo);
     _Write(uri);
 }
Esempio n. 4
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();
        }
Esempio n. 5
0
 /// <summary>
 /// Writes the record source to a uri.  This can one of 3 things:
 /// 1) A searchable TStore using the protocol "store:" e.g. store:foo
 /// 2) A RecordsFile using the protocol "recs:" e.g. recs:foobar
 /// 3) A FlatFile using no protocol e.g. flatfile
 /// </summary>
 /// <param name="outputUri"></param>
 public void Write(string outputUri)
 {
     TStoreUri uri = new TStoreUri(outputUri);
     _Write(uri);
 }