comparison src/goodjava/lucene/backup/BackupIndexWriter.java @ 1675:445048f9eca7

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 30 May 2022 17:50:54 -0600
parents af18eacf187c
children 973d3039c421
comparison
equal deleted inserted replaced
1674:af18eacf187c 1675:445048f9eca7
157 logger.error("bad_checksum "+fileName); 157 logger.error("bad_checksum "+fileName);
158 LogFile log = logMap.get(fileName); 158 LogFile log = logMap.get(fileName);
159 long len = log.end() - 8; 159 long len = log.end() - 8;
160 InputStream in = log.input(); 160 InputStream in = log.input();
161 call = new RpcCall(in,len,"add",logInfo,fileName); 161 call = new RpcCall(in,len,"add",logInfo,fileName);
162 logger.info("add "+fileName);
162 } else if( status.equals("incomplete") ) { 163 } else if( status.equals("incomplete") ) {
163 String fileName = (String)result.returnValues[1]; 164 String fileName = (String)result.returnValues[1];
164 long logEnd = (Long)result.returnValues[2]; 165 long logEnd = (Long)result.returnValues[2];
165 LogFile log = logMap.get(fileName); 166 LogFile log = logMap.get(fileName);
166 long len = log.end() - logEnd; 167 long len = log.end() - logEnd;
167 InputStream in = log.input(); 168 InputStream in = log.input();
168 in.skip(logEnd-8); 169 in.skip(logEnd-8);
169 call = new RpcCall(in,len,"append",logInfo,fileName); 170 call = new RpcCall(in,len,"append",logInfo,fileName);
171 // logger.info("append "+fileName);
170 } else 172 } else
171 throw new RuntimeException("status "+status); 173 throw new RuntimeException("status "+status);
172 } 174 }
173 } catch(RpcException e) { 175 } catch(RpcException e) {
174 logger.error("",e); 176 logger.error("",e);