michelya / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

When using disk logs, thl list can show a NullPointerException error #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
stephane@server1:/opt/continuent/tungsten/tungsten-replicator$ bin/thl list 
Connecting to storage2011-04-06 10:15:27,556 INFO replicator.thl.DiskLog Using 
directory '/opt/continuent/logs/' for replicator logs 
2011-04-06 10:15:27,556 INFO replicator.thl.DiskLog Checksums enabled for log 
records: true 
2011-04-06 10:15:27,560 INFO replicator.thl.DiskLog Acquired write lock; log is 
writable 
2011-04-06 10:15:27,565 INFO replicator.thl.DiskLog Loaded event serializer 
class: 
com.continuent.tungsten.enterprise.replicator.thl.serializer.ProtobufSerializer 
2011-04-06 10:15:27,567 INFO replicator.thl.LogIndex Building file index on log 
directory: /opt/continuent/logs 
2011-04-06 10:15:27,569 INFO replicator.thl.LogIndex Constructed index; total 
log files added=1 
2011-04-06 10:15:27,569 INFO replicator.thl.DiskLog Validating last log file: 
/opt/continuent/logs/thl.data.0000000001 
2011-04-06 10:15:27,571 INFO replicator.thl.DiskLog Idle log connection 
timeout: 28800000ms 
2011-04-06 10:15:27,571 INFO replicator.thl.DiskLog Log preparation is complete 
2011-04-06 10:15:27,571 INFO replicator.thl.DiskTHLStorage Adapter preparation 
is complete 
Fatal error: null 
java.lang.NullPointerException 
at 
com.continuent.tungsten.replicator.thl.THLManagerCtrl.printHeader(THLManagerCtrl
.java:307) 
at 
com.continuent.tungsten.enterprise.replicator.thl.EnterpriseTHLManagerCtrl.listE
vents(EnterpriseTHLManagerCtrl.java:207) 
at 
com.continuent.tungsten.enterprise.replicator.thl.EnterpriseTHLManagerCtrl.main(
EnterpriseTHLManagerCtrl.java:382) 

When using thl list -file <filename>, this error does not show up : 

stephane@server1:/opt/continuent/tungsten/tungsten-replicator$ bin/thl list 
-file thl.data.0000000001 
Connecting to storage2011-04-06 10:05:16,726 INFO replicator.thl.DiskLog Using 
directory '/opt/continuent/logs/' for replicator logs 
2011-04-06 10:05:16,727 INFO replicator.thl.DiskLog Checksums enabled for log 
records: true 
2011-04-06 10:05:16,731 INFO replicator.thl.DiskLog Acquired write lock; log is 
writable 
2011-04-06 10:05:16,735 INFO replicator.thl.DiskLog Loaded event serializer 
class: 
com.continuent.tungsten.enterprise.replicator.thl.serializer.ProtobufSerializer 
2011-04-06 10:05:16,738 INFO replicator.thl.LogIndex Building file index on log 
directory: /opt/continuent/logs 
2011-04-06 10:05:16,741 INFO replicator.thl.LogIndex Constructed index; total 
log files added=1 
2011-04-06 10:05:16,741 INFO replicator.thl.DiskLog Validating last log file: 
/opt/continuent/logs/thl.data.0000000001 
2011-04-06 10:05:16,743 INFO replicator.thl.DiskLog Idle log connection 
timeout: 28800000ms 
2011-04-06 10:05:16,743 INFO replicator.thl.DiskLog Log preparation is complete 
2011-04-06 10:05:16,743 INFO replicator.thl.DiskTHLStorage Adapter preparation 
is complete 
SEQ# = 8 / FRAG# = 0 (last frag) 
- TIME = 2011-04-02 04:25:54.0 
- EVENTID = 001239:0000000000002734;460 
- SOURCEID = atldb01 
- STATUS = COMPLETED(2) 
- SCHEMA = tungsten 
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent 
- OPTIONS = [autocommit = 1, sql_auto_is_null = 1, foreign_key_checks = 1, 
unique_checks = 1, sql_mode = '', character_set_client = 33, 
collation_connection = 33, collation_server = 33] 
- SQL(0) = UPDATE tungsten.heartbeat SET source_tstamp= '2011-04-02 02:25:54', 
salt= 0, name= 'MASTER_ONLINE' WHERE id= 1 

This shows that the first event in the log file is event #8. 

This does not show any log corruption. Problem is related to thl tool only. 

Original issue reported on code.google.com by stephane...@gtempaccount.com on 12 Apr 2011 at 8:37

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r44.

Original comment by stephane...@gtempaccount.com on 12 Apr 2011 at 8:43