jiangpengcheng commented on a change in pull request #4963:
URL: https://github.com/apache/openwhisk/pull/4963#discussion_r638605116



##########
File path: 
common/scala/src/main/scala/org/apache/openwhisk/core/database/mongodb/MongoDBArtifactStore.scala
##########
@@ -0,0 +1,661 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.database.mongodb
+
+import java.security.MessageDigest
+
+import akka.actor.ActorSystem
+import akka.event.Logging.ErrorLevel
+import akka.http.scaladsl.model._
+import akka.stream.ActorMaterializer
+import akka.stream.scaladsl._
+import akka.util.ByteString
+import com.mongodb.client.gridfs.model.GridFSUploadOptions
+import org.apache.openwhisk.common.{Logging, LoggingMarkers, TransactionId}
+import org.apache.openwhisk.core.database._
+import org.apache.openwhisk.core.database.StoreUtils._
+import org.apache.openwhisk.core.entity.Attachments.Attached
+import org.apache.openwhisk.core.entity.{DocId, DocInfo, DocRevision, 
DocumentReader, UUID}
+import org.apache.openwhisk.http.Messages
+import org.bson.json.{JsonMode, JsonWriterSettings}
+import org.mongodb.scala.bson.BsonString
+import org.mongodb.scala.bson.collection.immutable.Document
+import org.mongodb.scala.gridfs.{GridFSBucket, GridFSFile, 
MongoGridFSException}
+import org.mongodb.scala.model._
+import org.mongodb.scala.{MongoClient, MongoCollection, MongoException}
+import spray.json._
+
+import scala.concurrent.Future
+import scala.util.Try
+
+object MongoDBArtifactStore {
+  val _computed = "_computed"
+}
+
+/**
+ * Basic client to put and delete artifacts in a data store.
+ *
+ * @param client the mongodb client to access database
+ * @param dbName the name of the database to operate on
+ * @param collName the name of the collection to operate on
+ * @param documentHandler helper class help to simulate the designDoc of 
CouchDB
+ * @param viewMapper helper class help to simulate the designDoc of CouchDB
+ */
+class MongoDBArtifactStore[DocumentAbstraction <: DocumentSerializer](client: 
MongoClient,

Review comment:
       create a document on here: 
https://cwiki.apache.org/confluence/display/OPENWHISK/MongoDB+Artifact+Store




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to