Age | Commit message (Collapse) | Author | Files | Lines |
|
* Convers ids to longs instead of ints
* input and output fiel correctly named
* RateLimit is handled better.
Signed-off-by: Maurice Laveaux <maurice@localhost.localdomain>
|
|
* Reads a gzip stream.
* Uses the http request date for interval measurement.
|
|
|
|
* Throw interrupted exception when interrupted instead of swallowing
it, otherwise shutdown will take a longer time.
* Decrease number of tweets that must be requested after confirming
that the request was successful.
* Style: convert to foreach; white-space.
* Properly terminate if stop is requested.
* Make executeRequest take care of re-queing requests if needed.
|
|
|
|
|
|
* I dun goofed.
|
|
* TODO: threads don't exit safe, so cache is not valid.
|
|
* Usage, search <screen_name> <amount_tweets>.
|
|
|
|
* Changed JSONException to JsonParseException.
|
|
* The exception contains the reset timestamp in unix time.
|
|
* Response contains the JsonElement, tickrate, reset and leftover
data.
* Removed getJsonRelaxed, because it was not used elsewhere.
|
|
|
|
commit closes everything via safeClose, so ensure that tweetGenerated
re-opens it if necessary.
Fixes:
ƒ commit
€ Exception in thread "Thread-7" java.lang.NullPointerException
at io.DataWriter.writeObject(DataWriter.java:137)
at io.DataWriter.tweetGenerated(DataWriter.java:85)
at provider.CompositeResultListener.tweetGenerated(CompositeResultListener.java:51)
at io.StreamImpl$Poller.processObject(StreamImpl.java:255)
at io.StreamImpl$Poller.run(StreamImpl.java:245)
at java.lang.Thread.run(Thread.java:744)
|
|
|
|
|
|
These are always available from the tweets themselves...
|
|
|
|
|
|
|
|
|
|
|
|
Prevents occasional "Unexpected end of ZLIB input stream" errors.
|
|
Now print the faulty line and line number. Using BufferedReader instead
of Scanner also gave me a hint of the error, so let's stick to it.
|
|
Do not use the same name for compressed and uncompressed files, it is
confusing and non-standard. Now it'll use a ".gz"-suffixed file, writing
all changes from the uncompressed file if requested.
|
|
|
|
* Fix magic check (bytes are read as signed numbers...).
* Assume that a file can be compressed if the file is too small.
* Try to convert a file only if the gzip detection is correctly closed.
|
|
|
|
rename tricks somehow failed, but apparently there is a reliable
Files.move() operation. Add some more debugging messages.
|
|
Right now Store instances are created in the constructor of DataWriter.
This causes issues, namely that Store instances are unable to use
DataWriter in its constructor.
The real-world implication is that convertUncompressed in
CompressableDataWriter is unusable for the CompressedStore.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The input and output file are closely related, do not burden others with
tracking which output and input need to be matched.
|
|
Prepare for compressed file formats, this requires that the data writer
can handle compressed files. In theory an implementation can even
write stuff over the network instead of a file.
|
|
Files may not be accessible if they are read-only, or if the directory
is read-only, or ... whatever. So, let the caller handle IOException
in DataWriter.
Return a set if it can be read.
Do some misc cleanups (remove unused imports, fix docs, remove obsolete
TODOs).
|
|
Apparently the socket operations are blocking in a way such that even
interrupt() cannot stop it. Close the socket (which will generate an
IOException masked as JSONException) to immediately close the socket.
Also do not leak a socket if an error occurred in the Worker
constructor (when a Stream connection is set up).
|
|
|
|
|
|
* Use volatile boolean instead of AtomicBoolean. There will only be one
one writer.
* Store received objects in a queue instead of printing them.
* Rename thread to clarify its I/O purpose.
* Create new Thread for notifying observers of new tweets and users.
|
|
|
|
|
|
* Implemented target file, which uses DataWriter as
RequestListener which writes the tweets and profiles.
* Added profiles-filename, tweets-filename to the config.
|
|
|
|
|
|
|