You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aurora.apache.org by Suman Karumuri <sk...@twitter.com> on 2013/12/14 00:04:08 UTC
Review Request 16261: Now treating empty log file as new log file in test.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/
-----------------------------------------------------------
Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
Repository: aurora
Description
-------
Now treating empty log file as new log file in test.
Diffs
-----
src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
Diff: https://reviews.apache.org/r/16261/diff/
Testing
-------
Gradle clean build.
Tested with the isolated scheduler and an empty log file.
? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
-rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
Ran it on master:
Running on an empty file would result in an exception as follows:
E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
java.lang.IllegalStateException: Failed to open the log, cannot continue
at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
... 7 more
Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
... 9 more
Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
... 11 more
I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
UnresettableLogManager is ignoring a reset() request.
I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
After the fix: No exception.
Thanks,
Suman Karumuri
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Suman Karumuri <su...@gmail.com>.
> On Dec. 14, 2013, 1:58 a.m., Bill Farner wrote:
> > src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java, line 66
> > <https://reviews.apache.org/r/16261/diff/1/?file=397840#file397840line66>
> >
> > why not use logFile.length()?
>
> Bill Farner wrote:
> Also, while you're in here — mind validating this change with a unit test? (Using a temporary file under a FileUtils.createTempDir().)
>
> Suman Karumuri wrote:
> file length is not a reliable indicator for unicode files because of BOM header issues. More discussion about it at
> http://stackoverflow.com/questions/7190618/most-efficient-way-to-check-if-a-file-is-empty-in-java-on-windows
> and https://en.wikipedia.org/wiki/Byte-order_mark
>
> Will add unit test.
>
>
> Bill Farner wrote:
> Ok, please leave a comment about this decision. Otherwise someone like me will sweep by and convert it to .length().
done.
- Suman
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30399
-----------------------------------------------------------
On Dec. 14, 2013, 3:44 a.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2013, 3:44 a.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
> src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Suman Karumuri <su...@gmail.com>.
> On Dec. 14, 2013, 1:58 a.m., Bill Farner wrote:
> > src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java, line 66
> > <https://reviews.apache.org/r/16261/diff/1/?file=397840#file397840line66>
> >
> > why not use logFile.length()?
>
> Bill Farner wrote:
> Also, while you're in here — mind validating this change with a unit test? (Using a temporary file under a FileUtils.createTempDir().)
file length is not a reliable indicator for unicode files because of BOM header issues. More discussion about it at
http://stackoverflow.com/questions/7190618/most-efficient-way-to-check-if-a-file-is-empty-in-java-on-windows
and https://en.wikipedia.org/wiki/Byte-order_mark
Will add unit test.
- Suman
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30399
-----------------------------------------------------------
On Dec. 13, 2013, 11:04 p.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 13, 2013, 11:04 p.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Bill Farner <wf...@apache.org>.
> On Dec. 14, 2013, 1:58 a.m., Bill Farner wrote:
> > src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java, line 66
> > <https://reviews.apache.org/r/16261/diff/1/?file=397840#file397840line66>
> >
> > why not use logFile.length()?
>
> Bill Farner wrote:
> Also, while you're in here — mind validating this change with a unit test? (Using a temporary file under a FileUtils.createTempDir().)
>
> Suman Karumuri wrote:
> file length is not a reliable indicator for unicode files because of BOM header issues. More discussion about it at
> http://stackoverflow.com/questions/7190618/most-efficient-way-to-check-if-a-file-is-empty-in-java-on-windows
> and https://en.wikipedia.org/wiki/Byte-order_mark
>
> Will add unit test.
>
Ok, please leave a comment about this decision. Otherwise someone like me will sweep by and convert it to .length().
- Bill
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30399
-----------------------------------------------------------
On Dec. 13, 2013, 11:04 p.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 13, 2013, 11:04 p.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Bill Farner <wf...@apache.org>.
> On Dec. 14, 2013, 1:58 a.m., Bill Farner wrote:
> > src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java, line 66
> > <https://reviews.apache.org/r/16261/diff/1/?file=397840#file397840line66>
> >
> > why not use logFile.length()?
Also, while you're in here — mind validating this change with a unit test? (Using a temporary file under a FileUtils.createTempDir().)
- Bill
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30399
-----------------------------------------------------------
On Dec. 13, 2013, 11:04 p.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 13, 2013, 11:04 p.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30399
-----------------------------------------------------------
src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java
<https://reviews.apache.org/r/16261/#comment58189>
why not use logFile.length()?
- Bill Farner
On Dec. 13, 2013, 11:04 p.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 13, 2013, 11:04 p.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Suman Karumuri <su...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30455
-----------------------------------------------------------
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58259>
Done.
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58260>
I was wondering about that as well. Changed it now.
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58261>
Changed.
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58262>
Moved.
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58263>
Removed. Was making sure the files were indeed removed.
- Suman Karumuri
On Dec. 14, 2013, 3:44 a.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2013, 3:44 a.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
> src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30422
-----------------------------------------------------------
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58206>
we use junit 4, which does not require extending TestCase
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58207>
I realized shortly after recommending FileUtils that guava has Files.createTempDir. Sorry for the misdirection — mind using guava's routine instead?
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58210>
File has a constructor intended for this, which is agnostic to the system's path separator:
http://docs.oracle.com/javase/7/docs/api/java/io/File.html#File(java.io.File, java.lang.String)
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58208>
generally we place @After adjacent to @Before, to easily see symmetry
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java
<https://reviews.apache.org/r/16261/#comment58209>
Don't bother asserting on these. Assertion errors here will likely just create a red herring.
- Bill Farner
On Dec. 14, 2013, 3:44 a.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2013, 3:44 a.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
> src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Suman Karumuri <su...@gmail.com>.
> On Dec. 14, 2013, 6:16 p.m., Bill Farner wrote:
> > LGTM once the above nits are corrected.
Thanks!
- Suman
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30423
-----------------------------------------------------------
On Dec. 16, 2013, 6:16 p.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 16, 2013, 6:16 p.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
> src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/#review30423
-----------------------------------------------------------
Ship it!
LGTM once the above nits are corrected.
- Bill Farner
On Dec. 14, 2013, 3:44 a.m., Suman Karumuri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16261/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2013, 3:44 a.m.)
>
>
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Now treating empty log file as new log file in test.
>
>
> Diffs
> -----
>
> src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
> src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/16261/diff/
>
>
> Testing
> -------
>
> Gradle clean build.
>
> Tested with the isolated scheduler and an empty log file.
> ? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
> -rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
>
> Ran it on master:
>
> Running on an empty file would result in an exception as follows:
>
> E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
> java.lang.IllegalStateException: Failed to open the log, cannot continue
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
> at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
> at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
> at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
> at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
> at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
> at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
> Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
> at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
> at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
> ... 7 more
> Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
> at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
> ... 9 more
> Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
> at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
> at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
> at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
> at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
> at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
> at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
> at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
> at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
> ... 11 more
>
> I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
> UnresettableLogManager is ignoring a reset() request.
> I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
>
> After the fix: No exception.
>
>
> Thanks,
>
> Suman Karumuri
>
>
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Suman Karumuri <su...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/
-----------------------------------------------------------
(Updated Dec. 16, 2013, 6:16 p.m.)
Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
Changes
-------
made requested changes.
Repository: aurora
Description
-------
Now treating empty log file as new log file in test.
Diffs (updated)
-----
src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/16261/diff/
Testing
-------
Gradle clean build.
Tested with the isolated scheduler and an empty log file.
? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
-rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
Ran it on master:
Running on an empty file would result in an exception as follows:
E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
java.lang.IllegalStateException: Failed to open the log, cannot continue
at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
... 7 more
Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
... 9 more
Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
... 11 more
I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
UnresettableLogManager is ignoring a reset() request.
I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
After the fix: No exception.
Thanks,
Suman Karumuri
Re: Review Request 16261: Now treating empty log file as new log file in
test.
Posted by Suman Karumuri <su...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16261/
-----------------------------------------------------------
(Updated Dec. 14, 2013, 3:44 a.m.)
Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, Bill Farner, and Zameer Manji.
Changes
-------
Added a comment and a unit test as requested.
Repository: aurora
Description
-------
Now treating empty log file as new log file in test.
Diffs (updated)
-----
src/main/java/com/twitter/aurora/scheduler/log/testing/FileLog.java cb5cc874de161a0b992594c83469acfcd61e78ee
src/test/java/com/twitter/aurora/scheduler/log/testing/FileLogTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/16261/diff/
Testing
-------
Gradle clean build.
Tested with the isolated scheduler and an empty log file.
? git:(master) ? ls -lh /tmp/testing_log_file ~/workspace/incubator-aurora
-rw-r--r-- 1 skarumuri wheel 0B Dec 13 14:56 /tmp/testing_log_file
Ran it on master:
Running on an empty file would result in an exception as follows:
E1213 22:58:26.660 THREAD1 org.apache.zookeeper.server.NIOServerCnxn$Factory$1.uncaughtException: Thread Thread[main,5,main] died
java.lang.IllegalStateException: Failed to open the log, cannot continue
at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:289)
at com.twitter.aurora.scheduler.storage.CallOrderEnforcingStorage.prepare(CallOrderEnforcingStorage.java:80)
at com.twitter.aurora.scheduler.SchedulerLifecycle.prepare(SchedulerLifecycle.java:144)
at com.twitter.aurora.scheduler.app.SchedulerMain.run(SchedulerMain.java:255)
at com.twitter.common.application.AppLauncher.run(AppLauncher.java:102)
at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:181)
at com.twitter.common.application.AppLauncher.launch(AppLauncher.java:142)
at com.twitter.aurora.scheduler.app.SchedulerMain.main(SchedulerMain.java:276)
Caused by: java.io.IOException: Failed to interpret log contents: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:80)
at com.twitter.aurora.scheduler.storage.log.LogManager.open(LogManager.java:123)
at com.twitter.aurora.scheduler.storage.log.LogStorage.prepare(LogStorage.java:287)
... 7 more
Caused by: com.twitter.aurora.codec.ThriftBinaryCodec$CodingException: Failed to deserialize thrift object.
at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:86)
at com.twitter.aurora.codec.ThriftBinaryCodec.decode(ThriftBinaryCodec.java:59)
at com.twitter.aurora.scheduler.log.testing.FileLog.open(FileLog.java:67)
... 9 more
Caused by: org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 1 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
at org.apache.thrift.protocol.TBinaryProtocol.readByte(TBinaryProtocol.java:251)
at org.apache.thrift.protocol.TBinaryProtocol.readFieldBegin(TBinaryProtocol.java:215)
at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:349)
at com.twitter.aurora.gen.test.FileLogContents$FileLogContentsStandardScheme.read(FileLogContents.java:342)
at com.twitter.aurora.gen.test.FileLogContents.read(FileLogContents.java:292)
at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69)
at com.twitter.aurora.codec.ThriftBinaryCodec.decodeNonNull(ThriftBinaryCodec.java:79)
... 11 more
I1213 22:58:27.001 THREAD11 org.apache.zookeeper.server.SessionTrackerImpl.run: SessionTrackerImpl exited loop!
UnresettableLogManager is ignoring a reset() request.
I1213 22:58:27.002 THREAD14 com.twitter.common.application.ShutdownRegistry$ShutdownRegistryImpl.execute: Action controller has already completed, subsequent calls ignored.
After the fix: No exception.
Thanks,
Suman Karumuri