[ 
https://issues.apache.org/jira/browse/HBASE-7122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13626240#comment-13626240
 ] 

Himanshu Vashishtha commented on HBASE-7122:
--------------------------------------------

I thought it over too. 
bq. There still has the chance of empty log(Not the writing one) in normal log 
list.
When do you see this happening? If there are no entries in a log, we usually 
don't roll. Even if we do roll, we insert some meta data which make its size 
134 bytes.
On an ideal cluster:
{code}
hbase(main):009:0> hlog_roll 'localhost,60020,1365483729051'
0 row(s) in 0.0210 seconds

hbase(main):010:0> hlog_roll 'localhost,60020,1365483729051'
0 row(s) in 0.0170 seconds

hbase(main):011:0> hlog_roll 'localhost,60020,1365483729051'
0 row(s) in 0.0160 seconds
{code}

I see log files of size 134 bytes in the log directory.
{code}
-rwxrwxrwx 1 himanshu himanshu 1008 2013-04-08 23:08 
localhost%2C60020%2C1365483729051.1365483729440
-rwxrwxrwx 1 himanshu himanshu  134 2013-04-08 23:08 
localhost%2C60020%2C1365483729051.1365484108125
-rwxrwxrwx 1 himanshu himanshu  134 2013-04-08 23:09 
localhost%2C60020%2C1365483729051.1365484126213
-rwxrwxrwx 1 himanshu himanshu    0 2013-04-08 23:09 
localhost%2C60020%2C1365483729051.1365484193328

{code}
The middle two ones are the ones which didn't see any mutations as such.
                
> Proper warning message when opening a log file with no entries (idle cluster)
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-7122
>                 URL: https://issues.apache.org/jira/browse/HBASE-7122
>             Project: HBase
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 0.94.2
>            Reporter: Himanshu Vashishtha
>            Assignee: Himanshu Vashishtha
>             Fix For: 0.95.1
>
>         Attachments: HBase-7122-94.patch, HBase-7122-95.patch, 
> HBase-7122.patch, HBASE-7122.v2.patch
>
>
> In case the cluster is idle and the log has rolled (offset to 0), 
> replicationSource tries to open the log and gets an EOF exception. This gets 
> printed after every 10 sec until an entry is inserted in it.
> {code}
> 2012-11-07 15:47:40,924 DEBUG regionserver.ReplicationSource 
> (ReplicationSource.java:openReader(487)) - Opening log for replication 
> c0315.hal.cloudera.com%2C40020%2C1352324202860.1352327804874 at 0
> 2012-11-07 15:47:40,926 WARN  regionserver.ReplicationSource 
> (ReplicationSource.java:openReader(543)) - 1 Got: 
> java.io.EOFException
>       at java.io.DataInputStream.readFully(DataInputStream.java:180)
>       at java.io.DataInputStream.readFully(DataInputStream.java:152)
>       at org.apache.hadoop.io.SequenceFile$Reader.init(SequenceFile.java:1508)
>       at 
> org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1486)
>       at 
> org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1475)
>       at 
> org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1470)
>       at 
> org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogReader$WALReader.<init>(SequenceFileLogReader.java:55)
>       at 
> org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogReader.init(SequenceFileLogReader.java:175)
>       at 
> org.apache.hadoop.hbase.regionserver.wal.HLog.getReader(HLog.java:716)
>       at 
> org.apache.hadoop.hbase.replication.regionserver.ReplicationSource.openReader(ReplicationSource.java:491)
>       at 
> org.apache.hadoop.hbase.replication.regionserver.ReplicationSource.run(ReplicationSource.java:290)
> 2012-11-07 15:47:40,927 WARN  regionserver.ReplicationSource 
> (ReplicationSource.java:openReader(547)) - Waited too long for this file, 
> considering dumping
> 2012-11-07 15:47:40,927 DEBUG regionserver.ReplicationSource 
> (ReplicationSource.java:sleepForRetries(562)) - Unable to open a reader, 
> sleeping 1000 times 10
> {code}
> We should reduce the log spewing in this case (or some informative message, 
> based on the offset).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to