Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
zjffdu committed Oct 21, 2016
1 parent 6af4d0c commit 1751ec6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions docs/interpreter/pig.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ Data is shared between `%pig` and `%pig.query`, so that you can do some common w
##### pig.udf

```
%pig.udf
import org.apache.pig.data.Tuple;
import org.apache.pig.EvalFunc;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public boolean accept(File pathname) {
}
}
this.udfBuildClasspath = classPathBuilder.toString();
LOGGER.debug("udfBuildClass:" + udfBuildClasspath);
} else {
LOGGER.error("localRepo is missing or doesn't exist, " +
"zeppelin.interpreter.localRepo=" + localRepo);
}
}

Expand All @@ -92,7 +96,8 @@ public InterpreterResult interpret(String st, InterpreterContext context) {
return new InterpreterResult(InterpreterResult.Code.SUCCESS, "Build successfully");
} catch (Exception e) {
LOGGER.error("Fail to compile/build udf", e);
return new InterpreterResult(InterpreterResult.Code.ERROR, e.getMessage());
return new InterpreterResult(InterpreterResult.Code.ERROR,
InterpreterUtils.getMostRelevantMessage(e));
}
}

Expand Down
6 changes: 0 additions & 6 deletions pig/src/main/resources/interpreter-setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
"defaultValue": "false",
"description": "flag to include job stats in output"
}
},
"editor": {
"language": "pig"
}
},
{
Expand All @@ -38,9 +35,6 @@
"defaultValue": "1000",
"description": "max row number for %pig.query"
}
},
"editor": {
"language": "pig"
}
},
{
Expand Down

0 comments on commit 1751ec6

Please sign in to comment.