Skip to content

Commit

Permalink
EasyML 1.2.0 version, which include tensorflow support and other new …
Browse files Browse the repository at this point in the history
…improvements in release document.
  • Loading branch information
sinllychen committed Apr 2, 2018
1 parent e110e8a commit 5ac6ee0
Show file tree
Hide file tree
Showing 46 changed files with 1,029 additions and 301 deletions.
6 changes: 6 additions & 0 deletions QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ Because the hadoop cluster network communication depend on ssh, we need to confi
### Init Mysql database
* Run `sh init_mysql.sh` to prepare the databases for *Oozie* and *EasyML Studio*
### Add Tensorflow Support
Our EML installation package in version 1.2.0 or above could support Tensorflow mode.Follow the steps bellow If you want to have a try.

* Enter the `hadoop-master` container via  docker exec -it hadoop-master /bin/bash 
* Run `sh /root/config-tensorflow.sh` to config the environment that tensorflow need.
* If you want to config the environment yourself, you can do use the tensorflow folder scripts in EasyML Project.
### Start HDFS,spark and Yarn service
* Enter the *hadoop-master* container via `docker exec -it hadoop-master /bin/bash` (a vital important command to enter every container)
* Run `sh /root/start-hadoop.sh` to start hadoop and spark service
Expand Down
6 changes: 2 additions & 4 deletions mysql/studio/account.sql
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
/*
Navicat MySQL Data Transfer
Source Server : BDA(烟台)
Source Server Version : 50717
Source Host : 10.20.13.7:3306
Source Database : studio
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-10-18 16:18:47
Date: 2018-03-29 10:36:38
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for account
-- Table structure for `account`
-- ----------------------------
DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
Expand Down
12 changes: 6 additions & 6 deletions mysql/studio/bdajob.sql

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions mysql/studio/category.sql
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
/*
Navicat MySQL Data Transfer
Source Server : BDA(烟台)
Source Server Version : 50717
Source Host : 10.20.13.7:3306
Source Database : studio
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-10-18 16:27:48
Date: 2018-03-29 10:36:46
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for category
-- Table structure for `category`
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
Expand Down
9 changes: 4 additions & 5 deletions mysql/studio/dataset.sql
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
/*
Navicat MySQL Data Transfer
Source Server : BDA(烟台)
Source Server Version : 50717
Source Host : 10.20.13.7:3306
Source Database : studio
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-10-18 16:27:57
Date: 2018-03-29 10:36:02
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for dataset
-- Table structure for `dataset`
-- ----------------------------
DROP TABLE IF EXISTS `dataset`;
CREATE TABLE `dataset` (
Expand All @@ -37,4 +35,5 @@ CREATE TABLE `dataset` (
-- ----------------------------
-- Records of dataset
-- ----------------------------
INSERT INTO `dataset` VALUES ('Dataset', 'DataSet', 'System Data', '[email protected]', '/EML/Data/Dataset', '0', null, '0.1', '2017-04-29 16:34:01', '', 'General');
INSERT INTO `dataset` VALUES ('A2EEE4A9-EA84-47D2-9EAA-CC8CE701FD49', 'Dataset', '0A0F402F-670F-4696-9D9C-42F0E0D665A00', '[email protected]', '/EML/Data/A2EEE4A9-EA84-47D2-9EAA-CC8CE701FD49', '0', null, '0.1', '2018-03-28 18:40:08', '', '');
INSERT INTO `dataset` VALUES ('EA15288C-40D5-4E44-884E-0B0C508651BF', 'mnist', '0A0F402F-670F-4696-9D9C-42F0E0D665A00', '[email protected]', '/EML/Data/EA15288C-40D5-4E44-884E-0B0C508651BF', '0', null, '0.1', '2018-03-28 18:39:27', '', '');
6 changes: 2 additions & 4 deletions mysql/studio/jobcron.sql
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
/*
Navicat MySQL Data Transfer
Source Server : BDA(烟台)
Source Server Version : 50717
Source Host : 10.20.13.7:3306
Source Database : studio
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-10-18 16:28:07
Date: 2018-03-29 10:36:53
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for jobcron
-- Table structure for `jobcron`
-- ----------------------------
DROP TABLE IF EXISTS `jobcron`;
CREATE TABLE `jobcron` (
Expand Down
6 changes: 2 additions & 4 deletions mysql/studio/moduleversion.sql
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
/*
Navicat MySQL Data Transfer
Source Server : BDA(烟台)
Source Server Version : 50717
Source Host : 10.20.13.7:3306
Source Database : studio
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-10-18 16:28:16
Date: 2018-03-29 10:37:05
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for moduleversion
-- Table structure for `moduleversion`
-- ----------------------------
DROP TABLE IF EXISTS `moduleversion`;
CREATE TABLE `moduleversion` (
Expand Down
254 changes: 214 additions & 40 deletions mysql/studio/oozieaction.sql

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions mysql/studio/ooziejob.sql

Large diffs are not rendered by default.

39 changes: 21 additions & 18 deletions mysql/studio/program.sql

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions mysql/studio/supernode.sql
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
/*
Navicat MySQL Data Transfer
Source Server : BDA(烟台)
Source Server Version : 50717
Source Host : 10.20.13.7:3306
Source Database : studio
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-10-18 16:28:57
Date: 2018-03-29 10:37:25
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for supernode
-- Table structure for `supernode`
-- ----------------------------
DROP TABLE IF EXISTS `supernode`;
CREATE TABLE `supernode` (
Expand Down
42 changes: 33 additions & 9 deletions src/main/java/eml/studio/client/controller/DBController.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.logging.Logger;

import eml.studio.client.mvp.AppController;
import eml.studio.client.mvp.presenter.MonitorPresenter.View;
import eml.studio.client.mvp.presenter.Presenter;
import eml.studio.client.rpc.CategoryService;
import eml.studio.client.rpc.CategoryServiceAsync;
Expand Down Expand Up @@ -71,7 +72,7 @@ public class DBController {
* @return If submit is success
* @throws CommandParseException
*/
public boolean submitUploadProgram2DB(final Presenter presenter, final UploadFileModule fileUploader,
public boolean submitUploadProgram2DB(final Presenter presenter, final View view, final UploadFileModule fileUploader,
Program program, final DescribeGrid grid)
throws CommandParseException {
String name = grid.getText("Name");
Expand Down Expand Up @@ -107,6 +108,11 @@ public void onFailure(Throwable caught) {
@Override
public void onSuccess(Program result) {
fileUploader.setUpLoadProgram(result);
ProgramLeaf node = new ProgramLeaf(result);
ProgramTreeLoader.addContextMenu( view.getProgramTree(),
node);
ProgramTreeLoader.addProgramLeaf( view.getProgramTree(),
node,AppController.email);
logger.info("Program insert to DB:"+result.getCategory());
}
});
Expand All @@ -121,7 +127,7 @@ public void onSuccess(Program result) {
* @return If submit is success
* @throws CommandParseException
*/
public boolean submitUploadDataset2DB(final Presenter presenter,final UploadFileModule fileUploader
public boolean submitUploadDataset2DB(final Presenter presenter,final View view, final UploadFileModule fileUploader
,Dataset dataset, DescribeGrid grid)
throws CommandParseException {
String name = grid.getText("Name");
Expand All @@ -145,6 +151,12 @@ public void onFailure(Throwable caught) {
@Override
public void onSuccess(Dataset result) {
fileUploader.setUpLoadDataset(result);
DatasetLeaf node = new DatasetLeaf(result);
DatasetTreeLoader.addContextMenu( view.getDatasetTree()
,node);
DatasetTreeLoader.addDatasetLeaf( view.getDatasetTree(),
node,AppController.email);
logger.info("Dataset insert to DB:"+result.getCategory());
}
});
return true;
Expand Down Expand Up @@ -446,12 +458,14 @@ public static String[] getProgramPanelValue(final Program program, boolean isUpd
String TypeString = program.getType();
logger.info(TypeString.toLowerCase());
if ("单机".equals(TypeString.toLowerCase()) || "standalone".equals(TypeString.toLowerCase()))
values[i] = Constants.studioUIMsg.standalone() + "/" + Constants.studioUIMsg.distributed()+"/ETL";
values[i] = Constants.studioUIMsg.standalone() + "/" + Constants.studioUIMsg.distributed()+"/ETL"+"/Tensorflow";
if ("spark".equals(TypeString) || "分布式".equals(TypeString) ||TypeString.equals("distributed")||TypeString.toLowerCase().equals("distributed")) {
values[i] = Constants.studioUIMsg.distributed() + "/" + Constants.studioUIMsg.standalone() + "/ETL";
values[i] = Constants.studioUIMsg.distributed() + "/" + Constants.studioUIMsg.standalone() + "/ETL"+"/Tensorflow";
}
if ("etl".equals(TypeString))
values[i] = "ETL/"+Constants.studioUIMsg.distributed() + "/" + Constants.studioUIMsg.standalone();
values[i] = "ETL/"+Constants.studioUIMsg.distributed() + "/" + Constants.studioUIMsg.standalone()+"/Tensorflow";
if("tensorflow".equals(TypeString))
values[i] = "Tensorflow/"+Constants.studioUIMsg.distributed() + "/" + Constants.studioUIMsg.standalone()+"/ETL";

i ++;

Expand Down Expand Up @@ -482,6 +496,16 @@ public static String[] getProgramPanelValue(final Program program, boolean isUpd
values[i++] = program.getDescription();
values[i++] = program.getCommandline();

String tensorflowMode = program.getTensorflowMode();
if("单机".equals(tensorflowMode) || "standalone".equals(tensorflowMode))
values[i] = Constants.studioUIMsg.standalone()+"/"+Constants.studioUIMsg.modelDistributed()+"/"+Constants.studioUIMsg.dataDistributed();
else if("模型分布".equals(tensorflowMode) || "model distributed".equals(tensorflowMode))
values[i] = Constants.studioUIMsg.modelDistributed()+"/"+Constants.studioUIMsg.standalone()+"/"+Constants.studioUIMsg.dataDistributed();
else if("数据分布".equals(tensorflowMode) || "data distributed".equals(tensorflowMode))
values[i] = Constants.studioUIMsg.dataDistributed()+"/"+Constants.studioUIMsg.standalone()+"/"+Constants.studioUIMsg.modelDistributed();
else
values[i]= Constants.studioUIMsg.standalone()+"/"+Constants.studioUIMsg.modelDistributed()+"/"+Constants.studioUIMsg.dataDistributed();

return values;
}

Expand All @@ -507,10 +531,10 @@ public static String[] getDatasetPanelValue(final Dataset dataset, boolean isUpd

values[1] = null;
String TypeString = dataset.getContenttype();
if ("General".equals(TypeString)) values[2] = "General/TSV/CSV";
if ("TSV".equals(TypeString)) values[2] = "TSV/General/TSV";
if ("CSV".equals(TypeString)) values[2] = "CSV/General/TSV";
else values[2] = "General/TSV/CSV";
if (TypeString == null || TypeString.equals("") || "General".equals(TypeString)) values[2] = "General/CSV/TSV/JSON";
else if ("TSV".equals(TypeString)) values[2] = "TSV/General/CSV/JSON";
else if ("CSV".equals(TypeString)) values[2] = "CSV/General/TSV/JSON";
else values[2] = "JSON/General/TSV/CSV";
values[0] = dataset.getName();
values[5] = AppController.email;
values[6] = dataset.getDescription();
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/eml/studio/client/i18n/StudioUIMessages.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.google.gwt.i18n.client.Messages;

public interface StudioUIMessages extends Messages {

String yes();
String no();
String submit();
Expand All @@ -30,6 +30,8 @@ public interface StudioUIMessages extends Messages {
String systemData();
String preprocess();
String standalone();
String modelDistributed();
String dataDistributed();
String distributed();
String evaluation();
String transformation();
Expand Down Expand Up @@ -87,6 +89,7 @@ public interface StudioUIMessages extends Messages {
String moduleType();
String programable();
String moduleCMDFormat();
String tensorflowMode();

String dataName();
String dataCategory();
Expand Down
38 changes: 23 additions & 15 deletions src/main/java/eml/studio/client/ui/menu/JobDeleteMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*/
package eml.studio.client.ui.menu;

import eml.studio.client.mvp.AppController;
import eml.studio.client.rpc.JobService;
import eml.studio.client.rpc.JobServiceAsync;
import eml.studio.client.ui.tree.JobLeaf;
import eml.studio.client.util.Constants;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Command;
Expand All @@ -26,21 +28,27 @@ public static MenuItem create(final JobLeaf node) {
@Override
public void execute() {
String id = node.getModule().getJobId();
boolean y = Window.confirm("Are you sure you want to delete?");
if (y) {
JobServiceAsync srv = GWT.create(JobService.class);
srv.deleteJob(id, new AsyncCallback<Void>() {

@Override
public void onFailure(Throwable caught) {
Window.alert(caught.getMessage());
}

@Override
public void onSuccess(Void result) {
node.delete();
}
});
boolean isExampleDir = node.getParentItem().getText().equals(Constants.studioUIMsg.examples());
if(!isExampleDir && node.getModule().getAccount().equals(AppController.email) && node.getModule().getIsExample())
Window.alert("The job is example job, please don't delete it in my task!");
else
{
boolean y = Window.confirm("Are you sure you want to delete?");
if (y) {
JobServiceAsync srv = GWT.create(JobService.class);
srv.deleteJob(id, new AsyncCallback<Void>() {

@Override
public void onFailure(Throwable caught) {
Window.alert(caught.getMessage());
}

@Override
public void onSuccess(Void result) {
node.delete();
}
});
}
}
this.component.getContextMenu().hide();
}
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/eml/studio/client/ui/panel/EditProgramPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ public EditProgramPanel(String emailAccount,final ProgramTree tree,final Program
super();
labarr = new String[][]{
{"Name","Category","Type","Programable","Isdeterministic","Version","CreateDate",
"Owner","Description","CommandLine"},
"Owner","Description","CommandLine","TensorflowMode"},
{Constants.studioUIMsg.moduleName(), Constants.studioUIMsg.moduleCategory(),
Constants.studioUIMsg.moduleType(), Constants.studioUIMsg.programable(),
Constants.studioUIMsg.moduleDeterminacy(),Constants.studioUIMsg.moduleVersion(),
Constants.studioUIMsg.moduleCreateTime(), Constants.studioUIMsg.moduleOwner(),
Constants.studioUIMsg.dataDescription(),Constants.studioUIMsg.moduleCMDFormat()},
Constants.studioUIMsg.dataDescription(),Constants.studioUIMsg.moduleCMDFormat(),Constants.studioUIMsg.tensorflowMode()},
{"textbox","tree","listbox","listbox","listbox","textbox","textbox",
"textbox","textarea","textarea"},
{"true","true","true","true","true","true","false","false","true","true"},
"textbox","textarea","textarea","listbox"},
{"true","true","true","true","true","true","false","false","true","true","true"},
{"", Constants.studioUIMsg.chooseCategory(),
Constants.studioUIMsg.standalone() + "/" + Constants.studioUIMsg.distributed()+"/ETL",
Constants.studioUIMsg.standalone() + "/" + Constants.studioUIMsg.distributed()+"/ETL"+"/Tensorflow",
Constants.studioUIMsg.no()+"/" + Constants.studioUIMsg.yes(),
Constants.studioUIMsg.no()+"/" + Constants.studioUIMsg.yes(),
"0.1", TimeUtils.timeNow(), AppController.email, "", ""},
{"left","left","left","left","left","left","left","left","left","right"}
"0.1", TimeUtils.timeNow(), AppController.email, "", "",Constants.studioUIMsg.standalone()+"/"+Constants.studioUIMsg.modelDistributed()+"/"+Constants.studioUIMsg.dataDistributed()},
{"left","left","left","left","left","left","left","left","left","right","right"}
};
owner = emailAccount;
this.tree = tree;
Expand Down
Loading

0 comments on commit 5ac6ee0

Please sign in to comment.