[GitHub] incubator-predictionio issue #368: Update linux distro url
Github user dszeto commented on the issue: https://github.com/apache/incubator-predictionio/pull/368 Hey @steven-haddix , sorry for the late response and thanks for the PR. A couple comments about this PR. The Linux manual installation page is supposed to be used with binary distributions of PredictionIO, which we are tackling here: https://issues.apache.org/jira/browse/PIO-69 Also Apache encourages the use of their distributions mirrors instead of hitting their archive server directly, thus this instruction: http://predictionio.incubator.apache.org/install/install-sourcecode/#downloading-source-code. It would be great to find a way for `wget` to work automatically with Apache mirrors. --- 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. ---
[jira] [Commented] (PIO-69) Create binary version of PredictionIO as part of release process
[ https://issues.apache.org/jira/browse/PIO-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037648#comment-16037648 ] ASF GitHub Bot commented on PIO-69: --- Github user dszeto commented on the issue: https://github.com/apache/incubator-predictionio/pull/368 Hey @steven-haddix , sorry for the late response and thanks for the PR. A couple comments about this PR. The Linux manual installation page is supposed to be used with binary distributions of PredictionIO, which we are tackling here: https://issues.apache.org/jira/browse/PIO-69 Also Apache encourages the use of their distributions mirrors instead of hitting their archive server directly, thus this instruction: http://predictionio.incubator.apache.org/install/install-sourcecode/#downloading-source-code. It would be great to find a way for `wget` to work automatically with Apache mirrors. > Create binary version of PredictionIO as part of release process > > > Key: PIO-69 > URL: https://issues.apache.org/jira/browse/PIO-69 > Project: PredictionIO > Issue Type: New Feature > Components: Build >Reporter: Sara Asher >Assignee: Shinsuke Sugaya > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (PIO-69) Create binary version of PredictionIO as part of release process
[ https://issues.apache.org/jira/browse/PIO-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037643#comment-16037643 ] Donald Szeto commented on PIO-69: - Hey [~shinsuke], the main issue here is that Apache requires auditing all bundled 3rd party libraries in any binary distributions that would be uploaded to the Apache distribution network. Our make-distribution.sh script already handles creating the binary distribution part. What is missing here is to make sure the binary distribution only contains 3rd party libraries that are compatible with the APLv2 license. > Create binary version of PredictionIO as part of release process > > > Key: PIO-69 > URL: https://issues.apache.org/jira/browse/PIO-69 > Project: PredictionIO > Issue Type: New Feature > Components: Build >Reporter: Sara Asher >Assignee: Shinsuke Sugaya > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (PIO-86) Maintain a working docker container
[ https://issues.apache.org/jira/browse/PIO-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037641#comment-16037641 ] Steven Yan commented on PIO-86: --- [~sasher] If this helps, here is a Dockerfile https://github.com/steveny2k/docker-predictionio which is for 0.10.0. If needed, I can update it to be for 0.12.0. > Maintain a working docker container > --- > > Key: PIO-86 > URL: https://issues.apache.org/jira/browse/PIO-86 > Project: PredictionIO > Issue Type: Wish >Reporter: Sara Asher > Labels: needs-discussion > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[GitHub] incubator-predictionio pull request #371: [PIO-61] Add S3 Model Data Reposit...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-predictionio/pull/371 --- 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. ---
[GitHub] incubator-predictionio-sdk-ruby issue #20: Enable create event in batch
Github user dszeto commented on the issue: https://github.com/apache/incubator-predictionio-sdk-ruby/pull/20 LGTM. Thanks @kahirul ! --- 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. ---
[jira] [Updated] (PIO-61) Add S3 Model Data Repository
[ https://issues.apache.org/jira/browse/PIO-61?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Donald Szeto updated PIO-61: Fix Version/s: 0.12.0-incubating > Add S3 Model Data Repository > > > Key: PIO-61 > URL: https://issues.apache.org/jira/browse/PIO-61 > Project: PredictionIO > Issue Type: Improvement > Components: Core >Reporter: Shinsuke Sugaya >Assignee: Shinsuke Sugaya > Fix For: 0.12.0-incubating > > > To put/get model data to AWS S3 directly, using aws-java-sdk-s3, add > storage/s3 implementation. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[GitHub] incubator-predictionio-sdk-ruby issue #20: Enable create event in batch
Github user dszeto commented on the issue: https://github.com/apache/incubator-predictionio-sdk-ruby/pull/20 LGTM. Thanks @kahirul ! --- 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. ---
[GitHub] incubator-predictionio-sdk-ruby pull request #20: Enable create event in bat...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-predictionio-sdk-ruby/pull/20 --- 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. ---
[jira] [Resolved] (PIO-61) Add S3 Model Data Repository
[ https://issues.apache.org/jira/browse/PIO-61?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Donald Szeto resolved PIO-61. - Resolution: Fixed > Add S3 Model Data Repository > > > Key: PIO-61 > URL: https://issues.apache.org/jira/browse/PIO-61 > Project: PredictionIO > Issue Type: Improvement > Components: Core >Reporter: Shinsuke Sugaya >Assignee: Shinsuke Sugaya > Fix For: 0.12.0-incubating > > > To put/get model data to AWS S3 directly, using aws-java-sdk-s3, add > storage/s3 implementation. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[GitHub] incubator-predictionio issue #371: [PIO-61] Add S3 Model Data Repository
Github user dszeto commented on the issue: https://github.com/apache/incubator-predictionio/pull/371 Sorry for the delay. I was on vacation. This looks great to me, especially the use of `localstack`. I think the Travis failed downloading a Python library and erred out. It shouldn't matter IMO. I'll merge this now. --- 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. ---
[jira] [Commented] (PIO-61) Add S3 Model Data Repository
[ https://issues.apache.org/jira/browse/PIO-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037629#comment-16037629 ] ASF GitHub Bot commented on PIO-61: --- Github user asfgit closed the pull request at: https://github.com/apache/incubator-predictionio/pull/371 > Add S3 Model Data Repository > > > Key: PIO-61 > URL: https://issues.apache.org/jira/browse/PIO-61 > Project: PredictionIO > Issue Type: Improvement > Components: Core >Reporter: Shinsuke Sugaya >Assignee: Shinsuke Sugaya > Fix For: 0.12.0-incubating > > > To put/get model data to AWS S3 directly, using aws-java-sdk-s3, add > storage/s3 implementation. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[GitHub] incubator-predictionio-sdk-ruby issue #19: Add ability to push events to spe...
Github user dszeto commented on the issue: https://github.com/apache/incubator-predictionio-sdk-ruby/pull/19 LGTM. Thanks @ZhKostev ! --- 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. ---
[GitHub] incubator-predictionio-sdk-ruby pull request #19: Add ability to push events...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-predictionio-sdk-ruby/pull/19 --- 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. ---
[jira] [Commented] (PIO-61) Add S3 Model Data Repository
[ https://issues.apache.org/jira/browse/PIO-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037625#comment-16037625 ] ASF GitHub Bot commented on PIO-61: --- Github user dszeto commented on the issue: https://github.com/apache/incubator-predictionio/pull/371 Sorry for the delay. I was on vacation. This looks great to me, especially the use of `localstack`. I think the Travis failed downloading a Python library and erred out. It shouldn't matter IMO. I'll merge this now. > Add S3 Model Data Repository > > > Key: PIO-61 > URL: https://issues.apache.org/jira/browse/PIO-61 > Project: PredictionIO > Issue Type: Improvement > Components: Core >Reporter: Shinsuke Sugaya >Assignee: Shinsuke Sugaya > > To put/get model data to AWS S3 directly, using aws-java-sdk-s3, add > storage/s3 implementation. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
Re: PIO 0.12.0 and Graduation Time?
Sure, you can always ask. Someone might volunteer their time . On Mon, Jun 5, 2017 at 11:04 AM, Donald Szeto wrote: > Hey Andrew, is it possible for us to create non-release binary > distributions and ask Incubator PMC to help take a look without starting a > voting thread? This would allow us iron out issues in parallel to working > on 0.12. > > On Wed, May 31, 2017 at 9:08 AM, Andrew Purtell > wrote: > >> Really glad to see this discussion started, because I think your podling >> is nearing graduation. The most important determination of that is taking >> the initiative to propose it. >> >> I looked over the spreadsheet and have only this comment: You'll gain >> from having the incubator picking over your binary artifact release >> attempt, the first time you try to put one together. You won't have that >> after graduation. I recommend working through binary artifacts as part of >> 0.12, then proposing yourselves for graduation. >> >> >> On Thu, May 18, 2017 at 1:49 PM, Pat Ferrel >> wrote: >> >>> Should we apply for graduation to Apache TLP soon, like maybe the next >>> release? I started a Google doc for features we want and any Mentors can >>> add things we need to demonstrate for graduation since some may not be >>> Jira-able. >>> >>> All user’s should feel free to input. >>> >>> https://docs.google.com/document/d/1LTlzxH_CcWi67p8kCQPfPyu- >>> 1SwIJBkEonH3Yw4T6pY/edit?usp=sharing >> >> >> >> >> -- >> Best regards, >> >>- Andy >> >> If you are given a choice, you believe you have acted freely. - Raymond >> Teller (via Peter Watts) >> > > -- Best regards, - Andy If you are given a choice, you believe you have acted freely. - Raymond Teller (via Peter Watts)
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186661 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCChannels.scala --- @@ -0,0 +1,56 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.Channel +import org.apache.predictionio.data.storage.Channels +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCChannels, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementation of [[Channels]] */ +class OJDBCChannels(client: String, config: StorageClientConfig, prefix: String) + extends JDBCChannels(client, config, prefix) { + override def init() { --- End diff -- done --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186696 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCEngineInstances.scala --- @@ -0,0 +1,55 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.EngineInstance +import org.apache.predictionio.data.storage.EngineInstances +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCEngineInstances, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementation of [[EngineInstances]] */ +class OJDBCEngineInstances(client: String, config: StorageClientConfig, prefix: String) + extends JDBCEngineInstances(client, config, prefix) { + override def init() { --- End diff -- done --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186563 --- Diff: data/src/main/scala/org/apache/predictionio/data/storage/Storage.scala --- @@ -306,9 +306,18 @@ object Storage extends Logging { } val constructor = clazz.getConstructors()(0) try { - constructor.newInstance(ctorArgs: _*). + val instance = constructor.newInstance(ctorArgs: _*). asInstanceOf[T] + try { +val init = instance.getClass.getMethod("init") +init.invoke(instance) + } + catch { +case e: NoSuchMethodException => None --- End diff -- ok, good point. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186635 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCAccessKeys.scala --- @@ -0,0 +1,45 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.AccessKey +import org.apache.predictionio.data.storage.AccessKeys +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCAccessKeys, JDBCUtils} +import scalikejdbc._ + +import scala.util.Random + +/** JDBC implementation of [[AccessKeys]] */ +class OJDBCAccessKeys(client: String, config: StorageClientConfig, prefix: String) + extends JDBCAccessKeys(client, config, prefix) { + override def init() { --- End diff -- done --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186730 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCEvaluationInstances.scala --- @@ -0,0 +1,52 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.EvaluationInstance +import org.apache.predictionio.data.storage.EvaluationInstances +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCEvaluationInstances, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementations of [[EvaluationInstances]] */ +class OJDBCEvaluationInstances(client: String, config: StorageClientConfig, prefix: String) + extends JDBCEvaluationInstances(client, config, prefix) { + override def init() { --- End diff -- done --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186758 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCModels.scala --- @@ -0,0 +1,56 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import java.io.{ByteArrayInputStream, InputStream} +import java.sql.PreparedStatement + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.Model +import org.apache.predictionio.data.storage.Models +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCModels, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementation of [[Models]] */ +class OJDBCModels(client: String, config: StorageClientConfig, prefix: String) + extends JDBCModels(client, config, prefix) { + override def init() { --- End diff -- done --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186611 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/jdbc/JDBCEvaluationInstances.scala --- @@ -29,8 +29,9 @@ class JDBCEvaluationInstances(client: String, config: StorageClientConfig, prefi extends EvaluationInstances with Logging { /** Database table name for this data access object */ val tableName = JDBCUtils.prefixTableName(prefix, "evaluationinstances") - DB autoCommit { implicit session => -sql""" + def init() { --- End diff -- done --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186601 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/jdbc/JDBCChannels.scala --- @@ -29,14 +29,15 @@ class JDBCChannels(client: String, config: StorageClientConfig, prefix: String) extends Channels with Logging { /** Database table name for this data access object */ val tableName = JDBCUtils.prefixTableName(prefix, "channels") - DB autoCommit { implicit session => -sql""" + def init() { --- End diff -- ok, done --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186994 --- Diff: core/src/main/scala/org/apache/predictionio/workflow/CreateServer.scala --- @@ -198,7 +198,7 @@ object CreateServer extends Logging { kryo.invert(modeldata.get(engineInstance.id).get.models).get. asInstanceOf[Seq[Any]] -val batch = if (engineInstance.batch.nonEmpty) { +val batch = if (engineInstance.batch != null && engineInstance.batch.nonEmpty) { --- End diff -- if not so, pio deploy crashes. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user liningalex commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120186512 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/StorageClient.scala --- @@ -0,0 +1,53 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.BaseStorageClient +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.StorageClientException +import scalikejdbc._ + +/** JDBC implementation of [[BaseStorageClient]] */ +class StorageClient(val config: StorageClientConfig) + extends BaseStorageClient with Logging { + override val prefix = "OJDBC" + + if (!config.properties.contains("URL")) { +throw new StorageClientException("The URL variable is not set!", null) + } + if (!config.properties.contains("USERNAME")) { +throw new StorageClientException("The USERNAME variable is not set!", null) + } + if (!config.properties.contains("PASSWORD")) { +throw new StorageClientException("The PASSWORD variable is not set!", null) + } + + // set max size of connection pool + val maxSize: Int = config.properties.getOrElse("CONNECTIONS", "8").toInt + val settings = ConnectionPoolSettings(maxSize = maxSize) + + ConnectionPool.singleton( +config.properties("URL"), --- End diff -- changed to extends JDBC StorageClient to avoid code copy. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151665 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCChannels.scala --- @@ -0,0 +1,56 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.Channel +import org.apache.predictionio.data.storage.Channels +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCChannels, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementation of [[Channels]] */ +class OJDBCChannels(client: String, config: StorageClientConfig, prefix: String) + extends JDBCChannels(client, config, prefix) { + override def init() { --- End diff -- Same as above. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151628 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCApps.scala --- @@ -0,0 +1,59 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.App +import org.apache.predictionio.data.storage.Apps +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCApps, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementation of [[Apps]] */ +class OJDBCApps(client: String, config: StorageClientConfig, prefix: String) + extends JDBCApps(client, config, prefix) { + override def init() { --- End diff -- Same as above. --- 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. ---
Re: PIO 0.12.0 and Graduation Time?
Hey Andrew, is it possible for us to create non-release binary distributions and ask Incubator PMC to help take a look without starting a voting thread? This would allow us iron out issues in parallel to working on 0.12. On Wed, May 31, 2017 at 9:08 AM, Andrew Purtell wrote: > Really glad to see this discussion started, because I think your podling > is nearing graduation. The most important determination of that is taking > the initiative to propose it. > > I looked over the spreadsheet and have only this comment: You'll gain from > having the incubator picking over your binary artifact release attempt, the > first time you try to put one together. You won't have that after > graduation. I recommend working through binary artifacts as part of 0.12, > then proposing yourselves for graduation. > > > On Thu, May 18, 2017 at 1:49 PM, Pat Ferrel wrote: > >> Should we apply for graduation to Apache TLP soon, like maybe the next >> release? I started a Google doc for features we want and any Mentors can >> add things we need to demonstrate for graduation since some may not be >> Jira-able. >> >> All user’s should feel free to input. >> >> https://docs.google.com/document/d/1LTlzxH_CcWi67p8kCQPfPyu- >> 1SwIJBkEonH3Yw4T6pY/edit?usp=sharing > > > > > -- > Best regards, > >- Andy > > If you are given a choice, you believe you have acted freely. - Raymond > Teller (via Peter Watts) >
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120154775 --- Diff: core/src/main/scala/org/apache/predictionio/workflow/CreateServer.scala --- @@ -198,7 +198,7 @@ object CreateServer extends Logging { kryo.invert(modeldata.get(engineInstance.id).get.models).get. asInstanceOf[Seq[Any]] -val batch = if (engineInstance.batch.nonEmpty) { +val batch = if (engineInstance.batch != null && engineInstance.batch.nonEmpty) { --- End diff -- Is this null check necessary? --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151427 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/jdbc/JDBCEvaluationInstances.scala --- @@ -29,8 +29,9 @@ class JDBCEvaluationInstances(client: String, config: StorageClientConfig, prefi extends EvaluationInstances with Logging { /** Database table name for this data access object */ val tableName = JDBCUtils.prefixTableName(prefix, "evaluationinstances") - DB autoCommit { implicit session => -sql""" + def init() { --- End diff -- Same as above. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151860 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCModels.scala --- @@ -0,0 +1,56 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import java.io.{ByteArrayInputStream, InputStream} +import java.sql.PreparedStatement + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.Model +import org.apache.predictionio.data.storage.Models +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCModels, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementation of [[Models]] */ +class OJDBCModels(client: String, config: StorageClientConfig, prefix: String) + extends JDBCModels(client, config, prefix) { + override def init() { --- End diff -- Same as above. --- 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. ---
[GitHub] incubator-predictionio issue #387: Oracle databas supports
Github user takezoe commented on the issue: https://github.com/apache/incubator-predictionio/pull/387 @dszeto As our concern, is it possible to test with Oracle database on Travis-CI or ASF's Jenkins? If no, it might be difficult to guarantee this Oracle support works correctly over the future. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151731 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCEngineInstances.scala --- @@ -0,0 +1,55 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.EngineInstance +import org.apache.predictionio.data.storage.EngineInstances +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCEngineInstances, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementation of [[EngineInstances]] */ +class OJDBCEngineInstances(client: String, config: StorageClientConfig, prefix: String) + extends JDBCEngineInstances(client, config, prefix) { + override def init() { --- End diff -- Same as above. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151544 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCAccessKeys.scala --- @@ -0,0 +1,45 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.AccessKey +import org.apache.predictionio.data.storage.AccessKeys +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCAccessKeys, JDBCUtils} +import scalikejdbc._ + +import scala.util.Random + +/** JDBC implementation of [[AccessKeys]] */ +class OJDBCAccessKeys(client: String, config: StorageClientConfig, prefix: String) + extends JDBCAccessKeys(client, config, prefix) { + override def init() { --- End diff -- Same as above. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120153688 --- Diff: data/src/main/scala/org/apache/predictionio/data/storage/Storage.scala --- @@ -306,9 +306,18 @@ object Storage extends Logging { } val constructor = clazz.getConstructors()(0) try { - constructor.newInstance(ctorArgs: _*). + val instance = constructor.newInstance(ctorArgs: _*). asInstanceOf[T] + try { +val init = instance.getClass.getMethod("init") +init.invoke(instance) --- End diff -- In my opinion, if `init()` method is necessary for data objects, we should define a trait (e.g. `Initializable`) which has a `init()` method and cast by pattern match here to call `init()` method. But since this is just my thought, we need opinion from other committers as well. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120150849 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/jdbc/JDBCChannels.scala --- @@ -29,14 +29,15 @@ class JDBCChannels(client: String, config: StorageClientConfig, prefix: String) extends Channels with Logging { /** Database table name for this data access object */ val tableName = JDBCUtils.prefixTableName(prefix, "channels") - DB autoCommit { implicit session => -sql""" + def init() { --- End diff -- Don't use the deperecated procedure syntax. See: https://issues.scala-lang.org/browse/SI-7605 It should be: ```scala def init() = { DB autoCommit { implicit session => ... } } ``` or ```scala def init() = DB autoCommit { implicit session => ... } ``` --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151795 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/OJDBCEvaluationInstances.scala --- @@ -0,0 +1,52 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.EvaluationInstance +import org.apache.predictionio.data.storage.EvaluationInstances +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.jdbc.{JDBCEvaluationInstances, JDBCUtils} +import scalikejdbc._ + +/** JDBC implementations of [[EvaluationInstances]] */ +class OJDBCEvaluationInstances(client: String, config: StorageClientConfig, prefix: String) + extends JDBCEvaluationInstances(client, config, prefix) { + override def init() { --- End diff -- Same as above. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151484 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/jdbc/JDBCModels.scala --- @@ -28,15 +28,18 @@ import scalikejdbc._ class JDBCModels(client: String, config: StorageClientConfig, prefix: String) extends Models with Logging { /** Database table name for this data access object */ + val tableName = JDBCUtils.prefixTableName(prefix, "models") - /** Determines binary column type based on JDBC driver type */ - val binaryColumnType = JDBCUtils.binaryColumnType(client) - DB autoCommit { implicit session => -sql""" + def init() { --- End diff -- Same as above. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120151362 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/jdbc/JDBCEngineInstances.scala --- @@ -29,8 +29,9 @@ class JDBCEngineInstances(client: String, config: StorageClientConfig, prefix: S extends EngineInstances with Logging { /** Database table name for this data access object */ val tableName = JDBCUtils.prefixTableName(prefix, "engineinstances") - DB autoCommit { implicit session => -sql""" + def init() { --- End diff -- Same as above. --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user takezoe commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120147041 --- Diff: data/src/main/scala/org/apache/predictionio/data/storage/Storage.scala --- @@ -306,9 +306,18 @@ object Storage extends Logging { } val constructor = clazz.getConstructors()(0) try { - constructor.newInstance(ctorArgs: _*). + val instance = constructor.newInstance(ctorArgs: _*). asInstanceOf[T] + try { +val init = instance.getClass.getMethod("init") +init.invoke(instance) + } + catch { +case e: NoSuchMethodException => None --- End diff -- If the return value of try expression is not used, `Unit` is suitable than `None` for ignoring an exception as following: ```scala case _: NoSuchMethodException => () ``` --- 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. ---
[GitHub] incubator-predictionio pull request #387: Oracle databas supports
Github user ex00 commented on a diff in the pull request: https://github.com/apache/incubator-predictionio/pull/387#discussion_r120063752 --- Diff: storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/ojdbc/StorageClient.scala --- @@ -0,0 +1,53 @@ +/* + * 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.predictionio.data.storage.ojdbc + +import grizzled.slf4j.Logging +import org.apache.predictionio.data.storage.BaseStorageClient +import org.apache.predictionio.data.storage.StorageClientConfig +import org.apache.predictionio.data.storage.StorageClientException +import scalikejdbc._ + +/** JDBC implementation of [[BaseStorageClient]] */ +class StorageClient(val config: StorageClientConfig) + extends BaseStorageClient with Logging { + override val prefix = "OJDBC" + + if (!config.properties.contains("URL")) { +throw new StorageClientException("The URL variable is not set!", null) + } + if (!config.properties.contains("USERNAME")) { +throw new StorageClientException("The USERNAME variable is not set!", null) + } + if (!config.properties.contains("PASSWORD")) { +throw new StorageClientException("The PASSWORD variable is not set!", null) + } + + // set max size of connection pool + val maxSize: Int = config.properties.getOrElse("CONNECTIONS", "8").toInt + val settings = ConnectionPoolSettings(maxSize = maxSize) + + ConnectionPool.singleton( +config.properties("URL"), --- End diff -- May be do use conts for "URL", "USERNAME", "USERNAME" etc? for avoid problems about copy-paste --- 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. ---
[GitHub] incubator-predictionio pull request #389: [PIO-91] Fixed hadoop-hdfs artifac...
GitHub user shimamoto opened a pull request: https://github.com/apache/incubator-predictionio/pull/389 [PIO-91] Fixed hadoop-hdfs artifact missing error I made a mistake when I reviewed dependencies. Basically, the problem is due to unavailability of the hadoop-hdfs jars. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shimamoto/incubator-predictionio pio-91_hadoop-hdfs-missing Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-predictionio/pull/389.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #389 commit f60af2c4dd5d4656ccab189b5590a9dc451ffb27 Author: shimamoto Date: 2017-06-05T11:55:45Z [PIO-91] Fixed hadoop-hdfs artifact missing error. --- 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. ---
[GitHub] incubator-predictionio pull request #390: Fix duplicate org name
GitHub user duksis opened a pull request: https://github.com/apache/incubator-predictionio/pull/390 Fix duplicate org name https://cloud.githubusercontent.com/assets/222101/26783428/611434f8-49f8-11e7-9b5b-2d4f2dd656be.png";> template repo in all the cases where this is used is passed in as a github slug "org/repo" and ends up having broken links with duplicate org in them. https://github.com/apache/incubator-predictionio/blob/livedoc/docs/manual/source/templates/vanilla/quickstart.html.md.erb#L49 You can merge this pull request into a Git repository by running: $ git pull https://github.com/duksis/incubator-predictionio patch-2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-predictionio/pull/390.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #390 commit 10d7f4356e4db3d9ddfee0b8f473109862cd033d Author: Hugo Duksis Date: 2017-06-05T11:55:57Z Fix duplicate org name template repo in all the cases where this is used is passed in as a github slug "org/repo" and ends up having broken links with duplicate org in them. https://github.com/apache/incubator-predictionio/blob/livedoc/docs/manual/source/templates/vanilla/quickstart.html.md.erb#L49 --- 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. ---
[jira] [Commented] (PIO-91) hadoop-hdfs artifact missing when creating binary version of PredictionIO
[ https://issues.apache.org/jira/browse/PIO-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036848#comment-16036848 ] ASF GitHub Bot commented on PIO-91: --- GitHub user shimamoto opened a pull request: https://github.com/apache/incubator-predictionio/pull/389 [PIO-91] Fixed hadoop-hdfs artifact missing error I made a mistake when I reviewed dependencies. Basically, the problem is due to unavailability of the hadoop-hdfs jars. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shimamoto/incubator-predictionio pio-91_hadoop-hdfs-missing Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-predictionio/pull/389.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #389 commit f60af2c4dd5d4656ccab189b5590a9dc451ffb27 Author: shimamoto Date: 2017-06-05T11:55:45Z [PIO-91] Fixed hadoop-hdfs artifact missing error. > hadoop-hdfs artifact missing when creating binary version of PredictionIO > - > > Key: PIO-91 > URL: https://issues.apache.org/jira/browse/PIO-91 > Project: PredictionIO > Issue Type: Bug > Components: Build >Affects Versions: 0.11.0-incubating > Environment: Spark: 1.6.3 for Hadoop 2.6 > Hadoop: 2.6.5 > Elasticsearch: 1.7.3 > Hbase: 1.2.5 > Scala: 2.10.6 >Reporter: Stephan Volkeri >Assignee: Takako Shimamoto > > I tried to upgrade from Version 0.10.0-incubating to 0.11.0-incubating. > After I created the binary version with: > ./make-distribution.sh -Dscala.version=2.10.5 -Dspark.version=1.6.3 > -Delasticsearch.version=1.7.5 > I copied the config files from my 0.10.0-incubating conf folder. > During the test with "pio status" I got following error: > 2017-05-31 13:08:46,819 ERROR org.apache.predictionio.data.storage.Storage$ > [main] - Error initializing storage client for source HDFS > java.io.IOException: No FileSystem for scheme: hdfs > at > org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2586) > at > org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2593) > at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:91) > at > org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2632) > at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2614) > at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370) > at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:169) > at > org.apache.predictionio.data.storage.hdfs.StorageClient.(StorageClient.scala:32) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:423) > at > org.apache.predictionio.data.storage.Storage$.getClient(Storage.scala:223) > at > org.apache.predictionio.data.storage.Storage$.org$apache$predictionio$data$storage$Storage$$updateS2CM(Storage.scala:254) > at > org.apache.predictionio.data.storage.Storage$$anonfun$sourcesToClientMeta$1.apply(Storage.scala:215) > at > org.apache.predictionio.data.storage.Storage$$anonfun$sourcesToClientMeta$1.apply(Storage.scala:215) > at > scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189) > at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:91) > at > org.apache.predictionio.data.storage.Storage$.sourcesToClientMeta(Storage.scala:215) > at > org.apache.predictionio.data.storage.Storage$.getDataObject(Storage.scala:284) > at > org.apache.predictionio.data.storage.Storage$.getDataObjectFromRepo(Storage.scala:269) > at > org.apache.predictionio.data.storage.Storage$.getModelDataModels(Storage.scala:411) > at > org.apache.predictionio.data.storage.Storage$.verifyAllDataObjects(Storage.scala:350) > at > org.apache.predictionio.tools.commands.Management$.status(Management.scala:156) > at org.apache.predictionio.tools.console.Pio$.status(Pio.scala:144) > at > org.apache.predictionio.tools.console.Console$$anonfun$main$1.apply(Console.scala:663) > at > org.apache.predictionio.tools.console.Console$$anonfun$main$1.apply(Console.scala:611) > at scala.Option.map(Option.scala:145) > at > org.apache.predictionio.tools.console.Console$.main(Console.scala:611) > at org.apache.predictionio.tools.console.Console.main(Console.scala) > 2017-0