zxs / tungsten-replicator

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

ReplicateFilter gets NullPointerException if a filter string is omitted #254

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Configure ReplicateFilter in a pipeline, setting only one parameter as in 
the following example. 

# Use replicate filter to suppress unwanted tables.
replicator.filter.replicate=com.continuent.tungsten.replicator.filter.ReplicateF
ilter
replicator.filter.replicate.ignoreFilter=public.table_a,public.table_b

2. Bring the replicator online.  

What is the expected output?

Replicator comes online and ignores updates on the tables shown above.  

What do you see instead?

Replicator fails with a stack trace like the following: 
INFO   | jvm 1    | 2011/11/07 15:52:36 | Caused by: 
java.lang.NullPointerException
INFO   | jvm 1    | 2011/11/07 15:52:36 |       at 
com.continuent.tungsten.replicator.filter.ReplicateFilter.extractFilters(Replica
teFilter.java:249)
INFO   | jvm 1    | 2011/11/07 15:52:36 |       at 
com.continuent.tungsten.replicator.filter.ReplicateFilter.prepare(ReplicateFilte
r.java:239)
INFO   | jvm 1    | 2011/11/07 15:52:36 |       at 
com.continuent.tungsten.replicator.conf.ReplicatorRuntime.preparePlugin(Replicat
orRuntime.java:998)

What is the possible cause?

Filter does not handle missing filter strings. 

What is the proposed solution?

Fix the bug and also add this filter to installations so it is easier to 
configure properly. 

Additional information

...

Use labels and text to provide additional information.

Original issue reported on code.google.com by robert.h...@continuent.com on 8 Nov 2011 at 6:17

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

Original comment by robert.h...@continuent.com on 12 Nov 2011 at 4:15

GoogleCodeExporter commented 9 years ago
Just a clarification:
If you want to apply this filter out of the box, you can use these options with 
tungsten-installer

        -a --property=replicator.filter.Replicate.ignoreFilter=schema_x.tablex,schema_x,tabley,schema_y,tablez
         --svc-thl-filter=Replicate 

Original comment by g.maxia on 29 Dec 2011 at 3:17