You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@predictionio.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/24 23:35:20 UTC

[jira] [Commented] (PIO-28) Extract logic from functions handling console commands in tools package.

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

ASF GitHub Bot commented on PIO-28:
-----------------------------------

GitHub user Ziemin opened a pull request:

    https://github.com/apache/incubator-predictionio/pull/283

    [PIO-28] Console refactor

    I moved some logic from functions in console to a separate package - commands. These function should now mostly return Expected[Result] or MaybeError, which are basically aliases for Either[String, Result]. With the introduced changed it will be easier to implement the Admin Server, which could simply make use of the same logic as Console.
    
    In addition to that I removed template get and list commands as well as upgrade, because they are no longer going to be supported. Currently typing one of this commands will result with appropriate error.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Ziemin/incubator-predictionio console_refactor

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-predictionio/pull/283.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #283
    
----

----


> Extract logic from functions handling console commands in tools package.
> ------------------------------------------------------------------------
>
>                 Key: PIO-28
>                 URL: https://issues.apache.org/jira/browse/PIO-28
>             Project: PredictionIO
>          Issue Type: Sub-task
>            Reporter: Marcin ZiemiƄski
>            Priority: Minor
>
> Currently functions used by Console.scala to handle commands are evaluated for side effects - printing logs to the user. They either return integers or units and sometimes use sys.exit(1) on failure.
> The actual logic should be extracted from them to some other place for future applications, e.g. to be used by admin server, which is not implemented yet.
> Reporting results to the client should be separated from processing application logic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)