soabase / exhibitor

ZooKeeper co-process for instance monitoring, backup/recovery, cleanup and visualization.
https://groups.google.com/forum/#!topic/exhibitor-users/PVkcd88mk8c
Apache License 2.0
1.68k stars 444 forks source link

IndexCache.java have a code error #14

Closed qddxct closed 12 years ago

qddxct commented 12 years ago

1,
IndexCache.java public void releaseLogSearch(File indexDirectory) method shoud be -- --holder.useCount; not -- --holder.lastUse

2, IndexResource.java the mehtod @Path("get/{index-name}/{doc-id}") @GET @Produces(MediaType.APPLICATION_JSON) public Response getResult(@PathParam("index-name") String indexName, @PathParam("doc-id") int docId) throws Exception {

not have finally { context.getExhibitor().getIndexCache().releaseLogSearch(logSearch.getFile()); } It should be.

3,StandardProcessOperations.java cleanupInstance method not use for zookeeper 3.4.0 ,I had mailed to you !

4, IndexerUtil.java startIndexing () method then ZooKeeperLogParser.java public ZooKeeperLogParser(InputStream log) throws IOException { logStream = BinaryInputArchive.getArchive(log);

    FileHeader fhdr = new FileHeader();
    fhdr.deserialize(logStream, "fileheader");
    validHeader = (fhdr.getMagic() == FileTxnLog.TXNLOG_MAGIC);
}

when new index use “Use Current Logs” the radio two question :1, The zkdata/version-2/ Directory not only hava log.xxx ,It contains snapshot 等 it can/t work

  1. are you suce log is DirectoryInputStream can work?

if Directory only hava log.xxx,It can work ,but only one file can be indexed。 not the max zxid log。 so ,Now I changed the code just to indexed the max zxid log. because I do not know your purpose 。

Randgalt commented 12 years ago

1, 2 and 3 are fixed and pushed. They will be in the next release. For 4, please create a pull request and I'll look at it.