0

if you want to process a text file or log file with mapreduce by default the mapper input value ll b a line up to new line character but i want to process a log file

A (18:18:43,703 [ERROR] AccStmtGeneratorImpl - Statement not generated for::304005)

B (11:40:04,202 [ERROR] JobStoreTX - Failed to close Connection
 java.sql.SQLException: Already closed.
    at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114)
    at `enter code here`org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.closeConnection(JobStoreSupport.java:3579)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.cleanupConnection(JobStoreSupport.java:3555)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3783)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2728)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
)

here my mapper should take value from 11:40:04,202 to new timestamp means A 'll be a value and whole B ll b another value so how can i do this..? thanks in advance please help...

Sumeet
  • 43
  • 5
  • it can be achieved by writing Custom InputFormat, Custom RecordReader. like in the link http://xmlandhadoop.blogspot.com/ , your case is possible, but much effort needed to apply the same to your case as in example link , instead of xml tags, we have to apply pattern matching – vijay kumar May 26 '14 at 12:22
  • thank you vijay i am new to this i have written the code which gets 3 lines at the time but my requirement is different please suggest how can i do this ....i no regex lil bit.... – Sumeet May 26 '14 at 13:06

0 Answers0