Skip to content

Commit c5d53a3

Browse files
author
arnett, stu
committed
v2.0
1 parent 24414ff commit c5d53a3

File tree

198 files changed

+14018
-4725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+14018
-4725
lines changed

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
bin
2-
*.class
2+
build
33
# Package Files #
44
*.jar
55
*.war
@@ -11,5 +11,4 @@ bin
1111
.settings
1212
.idea
1313
*.iml
14-
esu.log
1514
.gradle

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
vipr-sync
1+
ecs-sync
22
=========
33

4-
ViPRSync is a bulk copy utility that can move data between various systems in parallel
4+
ecs-sync is a bulk copy utility that can move data between various systems in parallel
55

66
https://community.emc.com/docs/DOC-38905

build.gradle

+41-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 EMC Corporation. All Rights Reserved.
2+
* Copyright 2013-2015 EMC Corporation. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.
@@ -12,19 +12,21 @@
1212
* express or implied. See the License for the specific language governing
1313
* permissions and limitations under the License.
1414
*/
15-
group = 'com.emc.vipr'
16-
version = '1.4.0'
15+
group = 'com.emc.ecs'
16+
version = '2.0'
1717

18-
ext.mainClass = 'com.emc.vipr.sync.ViPRSync'
18+
ext.mainClass = 'com.emc.ecs.sync.EcsSync'
1919

20-
defaultTasks 'distZip'
20+
defaultTasks ':distZip'
2121

2222
buildscript {
2323
repositories {
24-
jcenter()
24+
jcenter {
25+
url "http://jcenter.bintray.com/"
26+
}
2527
}
2628
dependencies {
27-
classpath 'com.github.jengelman.gradle.plugins:shadow:1.0.3'
29+
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
2830
}
2931
}
3032

@@ -39,29 +41,45 @@ repositories {
3941
mavenLocal()
4042
}
4143

44+
project(':client') {
45+
apply plugin: 'java'
46+
repositories {
47+
mavenCentral()
48+
}
49+
dependencies {
50+
compile 'com.sun.jersey:jersey-client:1.19'
51+
testCompile 'junit:junit:4.11'
52+
}
53+
}
54+
4255
dependencies {
4356
compile files('lib/fplibrary-3.3.718.jar'),
44-
"log4j:log4j:1.2.16",
45-
"commons-cli:commons-cli:1.2",
57+
"org.slf4j:slf4j-api:1.7.12",
58+
"org.slf4j:slf4j-log4j12:1.7.12",
59+
"log4j:log4j:1.2.17",
60+
"commons-cli:commons-cli:1.3.1",
4661
"com.google.code.gson:gson:2.0",
4762
"com.emc.ecs:atmos-client:2.2.2.1",
48-
"mysql:mysql-connector-java:5.1.31",
63+
"com.emc.ecs:object-client:2.1.0",
64+
"mysql:mysql-connector-java:5.1.37",
4965
"org.springframework:spring-jdbc:3.2.6.RELEASE",
5066
"org.springframework:spring-context:3.2.6.RELEASE",
5167
"commons-dbcp:commons-dbcp:1.4",
52-
"com.amazonaws:aws-java-sdk:1.7.5",
53-
"net.java.truevfs:truevfs-profile-default:0.10.6",
54-
"org.slf4j:slf4j-log4j12:1.7.5"
68+
"com.amazonaws:aws-java-sdk-s3:1.10.5.1",
69+
"net.java.truevfs:truevfs-profile-default:0.11.0",
70+
"com.sun.jersey:jersey-server:1.19",
71+
"org.xerial:sqlite-jdbc:3.8.11.1",
72+
project(':client')
5573
testCompile "junit:junit:4.11",
5674
"org.hsqldb:hsqldb:2.3.2"
5775
}
5876

5977
compileJava {
60-
sourceCompatibility = 1.6
61-
targetCompatibility = 1.6
62-
if (project.hasProperty('java6Lib')) {
78+
sourceCompatibility = 1.7
79+
targetCompatibility = 1.7
80+
if (project.hasProperty('java7Lib')) {
6381
options.fork = true
64-
options.bootClasspath = new File(java6Lib).listFiles(
82+
options.bootClasspath = new File(java7Lib).listFiles(
6583
[accept:{d, f-> f ==~ /.*\.jar/ }] as FilenameFilter
6684
).join(File.pathSeparator)
6785
}
@@ -76,10 +94,10 @@ shadowJar {
7694
mergeServiceFiles()
7795
append('META-INF/spring.handlers')
7896
append('META-INF/spring.schemas')
79-
appendManifest {
97+
manifest {
8098
attributes 'Main-Class': mainClass,
8199
'Implementation-Version': project.version,
82-
'Class-Path': configurations.runtime.collect { it.getName() }.join(' ')
100+
'Class-Path': { configurations.runtime.collect { it.getName() }.join(' ') }
83101
}
84102
}
85103

@@ -100,10 +118,12 @@ distributions {
100118
from 'license.txt'
101119
from shadowJar
102120
from 'script'
103-
from 'docker'
104121
into('sample') {
105122
from 'sample'
106123
}
124+
into('docker') {
125+
from 'docker'
126+
}
107127
into('doc') {
108128
from javadocJar
109129
}
@@ -115,5 +135,5 @@ distributions {
115135
}
116136

117137
task wrapper(type: Wrapper) {
118-
gradleVersion = '1.11'
138+
gradleVersion = '2.6'
119139
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright 2013-2015 EMC Corporation. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0.txt
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.emc.ecs.sync.bean;
16+
17+
import javax.xml.bind.annotation.XmlElement;
18+
import javax.xml.bind.annotation.XmlRootElement;
19+
import java.util.ArrayList;
20+
import java.util.List;
21+
22+
@XmlRootElement(name = "ErrorList")
23+
public class ErrorList {
24+
private List<SyncError> errors = new ArrayList<>();
25+
26+
@XmlElement(name = "Error")
27+
public List<SyncError> getErrors() {
28+
return errors;
29+
}
30+
31+
public void setErrors(List<SyncError> errors) {
32+
this.errors = errors;
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Copyright 2013-2015 EMC Corporation. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0.txt
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.emc.ecs.sync.bean;
16+
17+
import javax.xml.bind.annotation.XmlElement;
18+
import javax.xml.bind.annotation.XmlRootElement;
19+
import javax.xml.bind.annotation.XmlType;
20+
21+
@XmlRootElement(name = "HostInfo")
22+
@XmlType(propOrder = {"hostCpuCount", "hostCpuLoad", "hostMemoryUsed", "hostTotalMemory"})
23+
public class HostInfo {
24+
private int hostCpuCount;
25+
private double hostCpuLoad;
26+
private long hostMemoryUsed;
27+
private long hostTotalMemory;
28+
29+
@XmlElement(name = "HostCpuCount")
30+
public int getHostCpuCount() {
31+
return hostCpuCount;
32+
}
33+
34+
public void setHostCpuCount(int hostCpuCount) {
35+
this.hostCpuCount = hostCpuCount;
36+
}
37+
38+
@XmlElement(name = "HostCpuLoad")
39+
public double getHostCpuLoad() {
40+
return hostCpuLoad;
41+
}
42+
43+
public void setHostCpuLoad(double hostCpuLoad) {
44+
this.hostCpuLoad = hostCpuLoad;
45+
}
46+
47+
@XmlElement(name = "HostMemoryUsed")
48+
public long getHostMemoryUsed() {
49+
return hostMemoryUsed;
50+
}
51+
52+
public void setHostMemoryUsed(long hostMemoryUsed) {
53+
this.hostMemoryUsed = hostMemoryUsed;
54+
}
55+
56+
@XmlElement(name = "HostTotalMemory")
57+
public long getHostTotalMemory() {
58+
return hostTotalMemory;
59+
}
60+
61+
public void setHostTotalMemory(long hostTotalMemory) {
62+
this.hostTotalMemory = hostTotalMemory;
63+
}
64+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Copyright 2013-2015 EMC Corporation. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0.txt
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.emc.ecs.sync.bean;
16+
17+
import javax.xml.bind.annotation.XmlElement;
18+
import javax.xml.bind.annotation.XmlRootElement;
19+
import javax.xml.bind.annotation.XmlType;
20+
21+
@XmlRootElement(name = "JobControl")
22+
@XmlType(propOrder = {"status", "syncThreadCount", "queryThreadCount"})
23+
public class JobControl {
24+
private JobControlStatus status;
25+
private int syncThreadCount;
26+
private int queryThreadCount;
27+
28+
public JobControl() {
29+
}
30+
31+
public JobControl(JobControlStatus status, int syncThreadCount, int queryThreadCount) {
32+
this.status = status;
33+
this.syncThreadCount = syncThreadCount;
34+
this.queryThreadCount = queryThreadCount;
35+
}
36+
37+
@XmlElement(name = "Status")
38+
public JobControlStatus getStatus() {
39+
return status;
40+
}
41+
42+
public void setStatus(JobControlStatus status) {
43+
this.status = status;
44+
}
45+
46+
@XmlElement(name = "SyncThreadCount")
47+
public int getSyncThreadCount() {
48+
return syncThreadCount;
49+
}
50+
51+
public void setSyncThreadCount(int syncThreadCount) {
52+
this.syncThreadCount = syncThreadCount;
53+
}
54+
55+
@XmlElement(name = "QueryThreadCount")
56+
public int getQueryThreadCount() {
57+
return queryThreadCount;
58+
}
59+
60+
public void setQueryThreadCount(int queryThreadCount) {
61+
this.queryThreadCount = queryThreadCount;
62+
}
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright 2013-2015 EMC Corporation. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0.txt
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.emc.ecs.sync.bean;
16+
17+
import javax.xml.bind.annotation.XmlEnum;
18+
19+
@XmlEnum
20+
public enum JobControlStatus {
21+
Initialized(false), Running(false), Paused(false), Stopping(false), Stopped(true), Complete(true);
22+
23+
private boolean finalState;
24+
25+
private JobControlStatus(boolean finalState) {
26+
this.finalState = finalState;
27+
}
28+
29+
public boolean isFinalState() {
30+
return finalState;
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright 2013-2015 EMC Corporation. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0.txt
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.emc.ecs.sync.bean;
16+
17+
import javax.xml.bind.annotation.XmlElement;
18+
19+
public class JobInfo {
20+
private Integer jobId;
21+
private JobControlStatus status;
22+
23+
public JobInfo() {
24+
}
25+
26+
public JobInfo(Integer jobId, JobControlStatus status) {
27+
this.jobId = jobId;
28+
this.status = status;
29+
}
30+
31+
@XmlElement(name = "JobId")
32+
public Integer getJobId() {
33+
return jobId;
34+
}
35+
36+
public void setJobId(Integer jobId) {
37+
this.jobId = jobId;
38+
}
39+
40+
@XmlElement(name = "Status")
41+
public JobControlStatus getStatus() {
42+
return status;
43+
}
44+
45+
public void setStatus(JobControlStatus status) {
46+
this.status = status;
47+
}
48+
}

0 commit comments

Comments
 (0)