myriad-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From javiro...@apache.org
Subject incubator-myriad git commit: MYRIAD-264 Upgrade Mesos API to 1.5.0
Date Sat, 17 Nov 2018 19:59:53 GMT
Repository: incubator-myriad
Updated Branches:
  refs/heads/master 237140085 -> d2b399196


MYRIAD-264 Upgrade Mesos API to 1.5.0

Until now Apache Myriad was based on Apache Mesos API 0.28.x
This patch enable Aapache Myriad for running in Apache Mesos 1.5.x

In order to align with current Apache Mesos deployments we have to
upgrade "at least" towards Apache Mesos 1.5.x API (this is the Mesos version
shipped in DC/OS 1.11.x and son on).

JIRA:
    [MYRIAD-264] https://issues.apache.org/jira/browse/MYRIAD-264

Pull Request:
    Closes #114

Author:    jpgilaberte <jpgilaberte@stratio.com>
Date:      Fri Oct 26 15:48:38 2018 +0200


Project: http://git-wip-us.apache.org/repos/asf/incubator-myriad/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-myriad/commit/d2b39919
Tree: http://git-wip-us.apache.org/repos/asf/incubator-myriad/tree/d2b39919
Diff: http://git-wip-us.apache.org/repos/asf/incubator-myriad/diff/d2b39919

Branch: refs/heads/master
Commit: d2b399196ac267267233974677dea46bc8d0f0d9
Parents: 2371400
Author: jpgilaberte <jpgilaberte@stratio.com>
Authored: Fri Oct 26 15:48:38 2018 +0200
Committer: Javi Roman <javiroman@apache.org>
Committed: Sat Nov 17 20:53:39 2018 +0100

----------------------------------------------------------------------
 build.gradle                                                     | 2 +-
 .../src/main/java/org/apache/myriad/MesosModule.java             | 2 +-
 .../src/main/java/org/apache/myriad/state/MyriadState.java       | 2 +-
 .../java/org/apache/myriad/state/utils/ByteBufferSupport.java    | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-myriad/blob/d2b39919/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 075b768..982b0e9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -69,7 +69,7 @@ subprojects {
     version = "0.2.0"
 
     ext {
-        mesosVer = "0.28.1"
+        mesosVer = "1.5.0:shaded-protobuf"
         //Allows passing -PhadoopVer=2.6.0 from command line
         if(!project.hasProperty('hadoopVer')) {
             hadoopVer = "2.7.0"

http://git-wip-us.apache.org/repos/asf/incubator-myriad/blob/d2b39919/myriad-scheduler/src/main/java/org/apache/myriad/MesosModule.java
----------------------------------------------------------------------
diff --git a/myriad-scheduler/src/main/java/org/apache/myriad/MesosModule.java b/myriad-scheduler/src/main/java/org/apache/myriad/MesosModule.java
index 7ca3962..cae800a 100644
--- a/myriad-scheduler/src/main/java/org/apache/myriad/MesosModule.java
+++ b/myriad-scheduler/src/main/java/org/apache/myriad/MesosModule.java
@@ -30,6 +30,7 @@ import org.apache.mesos.Protos.FrameworkID;
 import org.apache.mesos.Protos.FrameworkInfo;
 import org.apache.mesos.Protos.FrameworkInfo.Builder;
 import org.apache.mesos.SchedulerDriver;
+import org.apache.mesos.protobuf.ByteString;
 import org.apache.mesos.state.State;
 import org.apache.mesos.state.ZooKeeperState;
 import org.apache.myriad.configuration.MyriadConfiguration;
@@ -44,7 +45,6 @@ import com.google.inject.AbstractModule;
 import com.google.inject.Provides;
 import com.google.inject.Scopes;
 import com.google.inject.Singleton;
-import com.google.protobuf.ByteString;
 
 /**
  * Guice Module for Mesos objects.

http://git-wip-us.apache.org/repos/asf/incubator-myriad/blob/d2b39919/myriad-scheduler/src/main/java/org/apache/myriad/state/MyriadState.java
----------------------------------------------------------------------
diff --git a/myriad-scheduler/src/main/java/org/apache/myriad/state/MyriadState.java b/myriad-scheduler/src/main/java/org/apache/myriad/state/MyriadState.java
index 2f99720..3d2058e 100644
--- a/myriad-scheduler/src/main/java/org/apache/myriad/state/MyriadState.java
+++ b/myriad-scheduler/src/main/java/org/apache/myriad/state/MyriadState.java
@@ -18,9 +18,9 @@
  */
 package org.apache.myriad.state;
 
-import com.google.protobuf.InvalidProtocolBufferException;
 import java.util.concurrent.ExecutionException;
 import org.apache.mesos.Protos;
+import org.apache.mesos.protobuf.InvalidProtocolBufferException;
 import org.apache.mesos.state.State;
 import org.apache.mesos.state.Variable;
 

http://git-wip-us.apache.org/repos/asf/incubator-myriad/blob/d2b39919/myriad-scheduler/src/main/java/org/apache/myriad/state/utils/ByteBufferSupport.java
----------------------------------------------------------------------
diff --git a/myriad-scheduler/src/main/java/org/apache/myriad/state/utils/ByteBufferSupport.java
b/myriad-scheduler/src/main/java/org/apache/myriad/state/utils/ByteBufferSupport.java
index 9b0e643..1d6feed 100644
--- a/myriad-scheduler/src/main/java/org/apache/myriad/state/utils/ByteBufferSupport.java
+++ b/myriad-scheduler/src/main/java/org/apache/myriad/state/utils/ByteBufferSupport.java
@@ -21,7 +21,6 @@ package org.apache.myriad.state.utils;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
-import com.google.protobuf.GeneratedMessage;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -33,6 +32,7 @@ import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.mesos.Protos;
+import org.apache.mesos.protobuf.GeneratedMessageV3;
 import org.apache.myriad.scheduler.ServiceResourceProfile;
 import org.apache.myriad.scheduler.constraints.Constraint;
 import org.apache.myriad.scheduler.constraints.Constraint.Type;
@@ -81,7 +81,7 @@ public class ByteBufferSupport {
   /*
    * Common method to convert Protobuf object to ByteBuffer 
    */
-  public static ByteBuffer toBuffer(GeneratedMessage message) {
+  public static ByteBuffer toBuffer(GeneratedMessageV3 message) {
     byte dst[];
     int size;
     if (message != null) {


Mime
View raw message