You would need to detect that the file changed in the spout, and continue reading from the last offset. You would need to keep this state in the spout. If you wanted it to be fault tolerant you would need to save this state in a distributed filesystem or a database. On Jun 10, 2015 1:04 AM, "Rakeshsharma PR" <[email protected]> wrote:
> I understand that there is read function that reads the file and > nextTuple() emits tuples to the bolt each time. > > The spout and bolt keeps on running here, but if the file gets updated how > will it be read. In the book for Storm beginners, they say the nextTuple() > get called again and again for emitting the values. > > How will the real time processing work, in this case emitting the the > newly written data into the file. > > > > Thanks and Regards > > Rakesh > > > > > > Please consider the environment before printing this e-mail > > > Disclaimer: This communication is for the exclusive use of the intended > recipient(s) and shall not attach any liability on the originator or ITC > Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group > Companies. If you are the addressee, the contents of this e-mail are intended > for your use only and it shall not be forwarded to any third party, without > first obtaining written authorization from the originator or ITC Infotech > India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It > may contain information which is confidential and legally privileged and the > same shall not be used or dealt with by any third party in any manner > whatsoever without the specific consent of ITC Infotech India Ltd./ its > Holding company/ its Subsidiaries/ its Group Companies. >
