Re: How to implement AbstractRecordWriter

2019-05-31 Thread Paul Rogers
Hi Nicolas, Yet another suggestion, FWIW. We already have tests for writing JSON and CSV. We also have tests for reading MapR DB. So, try making changes to those and seeing if you can get those to run. For example, create a test that reads a file in CSV, write it to JSON, read it as JSON and

Re: How to implement AbstractRecordWriter

2019-05-31 Thread Paul Rogers
ce the writes to JSON with writes to MapRDB. > At > >> least this gives you a place to start looking. > >> > >> > >> A more general solution would be to build the writer using some of the > >> recent additions to Drill such as the row set mechanisms for reading

Re: How to implement AbstractRecordWriter

2019-05-31 Thread Nicolas A Perez
ning it must handle > > the > > >> Volcano iterator protocol. Looks like you can perhaps use > > WriterRecordBatch > > >> as the writer operator itself. (See EasyWriterBatchCreator and follow > > the > > >> code to understand the plumbing.)

Re: How to implement AbstractRecordWriter

2019-05-31 Thread Paul Rogers
development path might just be to copy the > >> JsonRecordWriter, and replace the writes to JSON with writes to MapRDB. > At > >> least this gives you a place to start looking. > >> > >> > >> A more general solution would be to build the writer using some

Re: How to implement AbstractRecordWriter

2019-05-31 Thread Nicolas A Perez
looking. > >> > >> > >> A more general solution would be to build the writer using some of the > >> recent additions to Drill such as the row set mechanisms for reading a > >> record batch. But, since copying the JSON approach provides a quick & &g

Re: How to implement AbstractRecordWriter

2019-05-31 Thread Paul Rogers
xpect. If you create your >> BatchCreator, but not the writer, things won't actually work, but you can >> set a breakpoint in the getBatch() method to verify the Drill did find your >> class. And so on. >> >>

Re: How to implement AbstractRecordWriter

2019-05-31 Thread Nicolas A Perez
; recent additions to Drill such as the row set mechanisms for reading a > >> record batch. But, since copying the JSON approach provides a quick & > dirty > >> solution, perhaps that is good enough for this particular use case. > >> > >> > >> In o

Re: How to implement AbstractRecordWriter

2019-05-31 Thread Charles Givre
is good enough for this particular use case. >> >> >> In our book, we recommend building each step one-by-one and doing a quick >> test to verify that each step works as you expect. If you create your >> BatchCreator, but not the writer, things won't actuall

Re: How to implement AbstractRecordWriter

2019-05-31 Thread Nicolas A Perez
your > BatchCreator, but not the writer, things won't actually work, but you can > set a breakpoint in the getBatch() method to verify the Drill did find your > class. And so on. > > > Thanks, > - Paul > > > > On Thursday, May 30, 2019, 3:05:39 AM PDT, Nicolas A Perez

Re: How to implement AbstractRecordWriter

2019-05-30 Thread Paul Rogers
actually work, but you can set a breakpoint in the getBatch() method to verify the Drill did find your class. And so on. Thanks, - Paul On Thursday, May 30, 2019, 3:05:39 AM PDT, Nicolas A Perez wrote: Can anyone give me an overview of how to implement AbstractRecordWriter? What are

How to implement AbstractRecordWriter

2019-05-30 Thread Nicolas A Perez
Can anyone give me an overview of how to implement AbstractRecordWriter? What are the mechanics it follows, what should I do and so on? It will very helpful. Best Regards, Nicolas A Perez -- Sent