From the original log it looks like the task is started, joins the consumer group, and gets assigned a partition twitter-0 (which seems to indicate this is a single partition topic). It also runs the recovery process, at which point it should be accepting data and writing it.
In the second log, there is this:
[2016-07-28 11:43:33,838] DEBUG Failed to detect a valid hadoop home directory (org.apache.hadoop.util.Shell:320)
java.io.IOException: Hadoop home directory does not exist, is not a directory, or is not an absolute path.
at org.apache.hadoop.util.Shell.checkHadoopHome(Shell.java:312)
at org.apache.hadoop.util.Shell.<clinit>(Shell.java:327)
at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:79)
at org.apache.hadoop.security.Groups.parseStaticMapping(Groups.java:104)
at org.apache.hadoop.security.Groups.<init>(Groups.java:86)
at org.apache.hadoop.security.Groups.<init>(Groups.java:66)
at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280)
at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:271)
at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:248)
at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:763)
at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:748)
at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:621)
at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2753)
at org.apache.hadoop.fs.FileSystem$Cache.getUnique(FileSystem.java:2617)
at org.apache.hadoop.fs.FileSystem.newInstance(FileSystem.java:417)
at io.confluent.connect.hdfs.storage.HdfsStorage.<init>(HdfsStorage.java:39)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.confluent.connect.hdfs.storage.StorageFactory.createStorage(StorageFactory.java:29)
at io.confluent.connect.hdfs.DataWriter.<init>(DataWriter.java:168)
at io.confluent.connect.hdfs.HdfsSinkTask.start(HdfsSinkTask.java:64)
at org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:207)
at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:139)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:140)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:175)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
which could be an issue.
Although it also looks like the task finishes, starts, and gets a partition assignment:
[2016-07-28 11:43:37,769] INFO Sink task WorkerSinkTask{id=hdfs-sink-twitter01-0} finished initialization and start (org.apache.kafka.connect.runtime.WorkerSinkTask:208)
[2016-07-28 11:43:37,991] INFO Setting newly assigned partitions [twitter-0] for group connect-hdfs-sink-twitter01 (org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:219)
And it also looks like its fetching data since some metrics are created:
[2016-07-28 11:43:38,087] DEBUG Added sensor with name topic.twitter.bytes-fetched (org.apache.kafka.common.metrics.Metrics:296)
[2016-07-28 11:43:38,088] DEBUG Added sensor with name topic.twitter.records-fetched (org.apache.kafka.common.metrics.Metrics:296)
(By the way, you could check these metrics to see if the fetches are getting any data.)
It does look like the partition is being paused, which does happen as part of the writing process:
[2016-07-28 11:43:38,351] DEBUG Pausing partition twitter-0 (org.apache.kafka.clients.consumer.KafkaConsumer:1312)
But then it should be writing to the temp file. There doesn't seem to be anything else relevant in the log, in particular no notice starting with "Starting commit and rotation for topic partition" which is when a file would be committed to its final location.
And then the connection to HDFS is closed:
So it seems like something is going wrong when writing the temp file, but we might need to improve the logging in the connector (including TRACE level) in order to figure out exactly where it is getting stuck.
Only other thing I can think of to suggest right now is taking a jstack dump after its been running for a bit. That might give us a clue about where it is getting stuck.
-Ewen