geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3283) Add gfsh option on export/import to parallelize a snapshot for PRs
Date Fri, 01 Sep 2017 18:31:00 GMT

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

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

Github user jinmeiliao commented on a diff in the pull request:

    https://github.com/apache/geode/pull/753#discussion_r136638194
  
    --- Diff: geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportDataCommand.java
---
    @@ -87,4 +80,45 @@ public Result exportData(
         }
         return result;
       }
    +
    +  private Result getFunctionResult(ResultCollector<?, ?> rc) {
    +    Result result;
    +    List<Object> results = (List<Object>) rc.getResult();
    +    if (results != null) {
    +      Object resultObj = results.get(0);
    +      if (resultObj instanceof String) {
    +        result = ResultBuilder.createInfoResult((String) resultObj);
    +      } else if (resultObj instanceof Exception) {
    +        result = ResultBuilder.createGemFireErrorResult(((Exception) resultObj).getMessage());
    +      } else {
    +        result = ResultBuilder.createGemFireErrorResult(
    +            CliStrings.format(CliStrings.COMMAND_FAILURE_MESSAGE, CliStrings.EXPORT_DATA));
    +      }
    +    } else {
    +      result = ResultBuilder.createGemFireErrorResult(
    +          CliStrings.format(CliStrings.COMMAND_FAILURE_MESSAGE, CliStrings.EXPORT_DATA));
    +    }
    +    return result;
    +  }
    +
    +  private String defaultFileName(String dirPath, String regionName) {
    +    return new File(dirPath, regionName + RegionSnapshotService.SNAPSHOT_FILE_EXTENSION)
    +        .getAbsolutePath();
    +  }
    +
    +  private Optional<Result> validatePath(String filePath, String dirPath, boolean
parallel) {
    --- End diff --
    
    this seems to be duplicated between import/export, any way we can use the same code base?


> Add gfsh option on export/import to parallelize a snapshot for PRs
> ------------------------------------------------------------------
>
>                 Key: GEODE-3283
>                 URL: https://issues.apache.org/jira/browse/GEODE-3283
>             Project: Geode
>          Issue Type: Sub-task
>          Components: snapshot
>            Reporter: Fred Krone
>            Assignee: Nick Reich
>
> This is related to another ticket to improve snapshot export time



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message