You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/08/05 21:33:00 UTC

[jira] [Commented] (GEODE-8407) MergeLogFiles fails to include files with the same name but in different directories

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

ASF GitHub Bot commented on GEODE-8407:
---------------------------------------

bschuchardt opened a new pull request #5428:
URL: https://github.com/apache/geode/pull/5428


   …ut in different directories
   
   I modified the upper levels of the merge process to hold a new object
   containing the file's display name and its inputStream.  The
   logFiles Map now holds the full path of a file and one of these new
   objects.  The new test then uses a dirCount of zero to test that
   two files with the same name but different parent directories are
   properly stored in the Map for processing.
   
   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> MergeLogFiles fails to include files with the same name but in different directories
> ------------------------------------------------------------------------------------
>
>                 Key: GEODE-8407
>                 URL: https://issues.apache.org/jira/browse/GEODE-8407
>             Project: Geode
>          Issue Type: Bug
>          Components: membership, tools
>            Reporter: Bruce J Schuchardt
>            Assignee: Bruce J Schuchardt
>            Priority: Major
>
> The default setting for MergeLogFiles is dirCount=0, meaning each line of the merge has the name of the corresponding log file but not its parent directory.
> I tried merging a bunch of files named _system.log_ in different directories and found that, though all of the files were listed in the header only one of them was in the merged output.
> If I set a dirCount of 1 then it works okay.
> I think the flaw is in this line:
> {code:java}
> logFiles.put(logFileName, new FileInputStream(file));
> {code}
>  This is after the dirCount has been applied.  In my case each logFileName is going to be _system.log_ and each will overwrite whatever's already in the map, leaving only one file.
> The full path name of each file should be used as a key in this map and the display name with dirCount applied needs to be held in this map in some other way.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)