Github user manuzhang commented on a diff in the pull request: https://github.com/apache/incubator-gearpump/pull/81#discussion_r77625961 --- Diff: core/src/main/scala/org/apache/gearpump/jarstore/JarStoreService.scala --- @@ -15,72 +15,39 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.gearpump.jarstore -import java.io.File -import java.net.URI -import java.util.ServiceLoader -import scala.collection.JavaConverters._ - -import akka.actor.ActorSystem -import com.typesafe.config.Config - -import org.apache.gearpump.util.{Constants, Util} - -case class FilePath(path: String) - -/** - * JarStoreService is used to manage the upload/download of binary files, - * like user submitted application jar. - */ -trait JarStoreService { - /** - * The scheme of the JarStoreService. - * Like "hdfs" for HDFS file system, and "file" for a local - * file system. - */ - val scheme: String - - /** - * Init the Jar Store. - */ - def init(config: Config, system: ActorSystem) - - /** - * This function will copy the local file to the remote JarStore, called from client side. - * @param localFile The local file - */ - def copyFromLocal(localFile: File): FilePath - - /** - * This function will copy the remote file to local file system, called from client side. - * - * @param localFile The destination of file path - * @param remotePath The remote file path from JarStore - */ - def copyToLocalFile(localFile: File, remotePath: FilePath) -} - -object JarStoreService { - - /** - * Get a active JarStoreService by specifying a scheme. - * - * Please see config [[org.apache.gearpump.util.Constants#GEARPUMP_APP_JAR_STORE_ROOT_PATH]] for - * more information. - */ - def get(config: Config): JarStoreService = { - val jarStoreRootPath = config.getString(Constants.GEARPUMP_APP_JAR_STORE_ROOT_PATH) - get(jarStoreRootPath) +import akka.actor.{Actor, Stash} +import akka.pattern.pipe +import org.slf4j.Logger + +import org.apache.gearpump.cluster.ClientToMaster.{GetJarStoreServer, JarStoreServerAddress} +import org.apache.gearpump.util._ + +class JarStoreService(jarStoreRootPath: String) extends Actor with Stash { --- End diff -- Do you think `JarStoreServer` is better mapping to `JarStoreClient` ?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---