Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 1.1.0
-
Fix Version/s: None
-
Component/s: Content
-
Labels:None
-
Environment:
tsa-build-bidmgr-2012-01-13-p467-rfa86f82c4977d04848d595aab426449c4e6fcefd
Description
Null value is inserted to the table tsacommon.callFeedExecution for invalid call data feed file having NULL count.
1. Customize call datafeed [gsingh@optus-qa-agency1 tmp]$ sudo vi call_data_2012-01-08_s1.csv
CUST ID DATE CALL COUNT
10000603 07/01/2012
2.Start calldata script
[tsaapp@optus-qa-agency1 bidmgr]$ ./calldata.sh /var/local/tsa/config/com.thesearchagency.datafeeds.calldata.properties
3.Place the file to location /var/local/tsa/calldata/
sudo cp call_data_2012-01-08_s1.csv /var/local/tsa/calldata/
4.[gsingh@optus-qa-agency1 tmp]$ sudo touch /var/local/tsa/calldata/call_data_2012-01-08_s1.csv.done
5.File doesn't process as the content is invalid and throws exception.
012-01-27 11:27:48.414 (3) [pool-1-thread-1]: Waiting for done file [/var/local/tsa/calldata/call_data_2012-01-08_s1.csv.done]
2012-01-27 11:27:58.430 (3) [pool-1-thread-1]: ======== Starting Call Data Load ========
2012-01-27 11:27:58.430 (3) [pool-1-thread-1]: Loading filename: /var/local/tsa/calldata/call_data_2012-01-08_s1.csv
2012-01-27 11:27:58.431 (3) [pool-1-thread-1]: DatabasePool with a limit of 80 created
2012-01-27 11:27:58.467 (1) [pool-1-thread-1]: Exception invalid line #2:com.thesearchagency.datafeeds.calldata.exception.InvalidLineException: invalid call value []
at com.thesearchagency.datafeeds.calldata.DataLoader.validateCalls(DataLoader.java:219)
at com.thesearchagency.datafeeds.calldata.DataLoader.handleDataRow(DataLoader.java:185)
at com.thesearchagency.datafeeds.calldata.DataLoader.parseFile(DataLoader.java:162)
at com.thesearchagency.datafeeds.calldata.DataLoader.run(DataLoader.java:87)
at com.thesearchagency.datafeeds.calldata.FileMonitor$DataFeedWorker.run(FileMonitor.java:176)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:470)
at java.lang.Integer.parseInt(Integer.java:499)
at com.thesearchagency.datafeeds.calldata.DataLoader.validateCalls(DataLoader.java:216)
... 7 more
2012-01-27 11:27:58.467 (1) [pool-1-thread-1]: Data rows in file (0) not equal to rows loaded in databse (0), manual intervention required
2012-01-27 11:27:58.470 (3) [pool-1-thread-1]: Lines processed: 0
2012-01-27 11:27:58.470 (3) [pool-1-thread-1]: Invalid lines: 1
2012-01-27 11:27:58.470 (3) [pool-1-thread-1]: ======== Finished Call Data Load (FAILED) ========
2012-01-27 11:27:58.470 (1) [pool-1-thread-1]: Invalid status for datafeed [FAILED], manual intervention requred
6.Check the database
mysql> select * from callFeedExecution order by id desc ;
------------------------------------------------------------------------------------------------------------------------------------------
id | fileName | runTimestamp | firstDate | lastDate | numDataLines | numDataLinesWithNegatives | numInvalidDataLines | status |
------------------------------------------------------------------------------------------------------------------------------------------
13 | call_data_2012-01-08_s1.csv | 2012-01-27 11:27:58 | NULL | NULL | 0 | 0 | 1 | FAILED |
12 | call_data_2012-01-23_s1.csv | 2012-01-27 11:25:32 | 2012-01-22 | 2012-01-22 | 1 | 0 | 0 | COMPLETED |
11 | call_data_2012-01-11_s1.csv | 2012-01-27 11:22:34 | NULL | NULL | 0 | 0 | 0 | FAILED |
10 | call_data_2012-01-10_s1.csv | 2012-01-27 11:19:08 | NULL | NULL | 0 | 0 | 0 | FAILED |
8 | call_data_2011-12-25_s1.csv.gz | 2012-01-27 11:03:53 | 2011-11-29 | 2011-11-29 | 0 | 0 | 0 | FAILED |
6 | call_data_2012-01-12_s1.csv.gz | 2012-01-27 10:45:37 | NULL | NULL | 0 | 0 | 0 | FAILED |
5 | call_data_2012-01-15_s1.csv.gz | 2012-01-27 10:34:36 | 2012-01-13 | 2012-01-13 | 1 | 0 | 0 | COMPLETED |
4 | call_data_2012-01-20_s1.csv.gz | 2012-01-27 10:24:47 | 2012-01-19 | 2012-01-19 | 1 | 0 | 0 | COMPLETED |
3 | call_data_2012-01-25_s1.csv | 2012-01-27 10:05:16 | 2012-01-25 | 2012-01-25 | 1 | 0 | 0 | COMPLETED |
2 | call_data_2011-12-26_s1.csv | 2012-01-17 14:26:22 | 2011-12-26 | 2011-12-26 | 1 | 0 | 0 | COMPLETED |
1 | call_data_2011-12-08_s1.csv | 2012-01-17 14:06:20 | 2011-11-29 | 2011-11-29 | 0 | 0 | 0 | FAILED |
------------------------------------------------------------------------------------------------------------------------------------------