<commit_before>/*
 * Copyright (C) 2013 - 2018, Logical Clocks AB and RISE SICS AB. All rights reserved
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this
 * software and associated documentation files (the "Software"), to deal in the Software
 * without restriction, including without limitation the rights to use, copy, modify, merge,
 * publish, distribute, sublicense, and/or sell copies of the Software, and to permit
 * persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or
 * substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  OR IMPLIED, INCLUDING
 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

package io.hops.hopsworks.common.dao.jupyter;

import io.hops.hopsworks.common.dao.project.Project;
import io.hops.hopsworks.common.dao.user.Users;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name = "jupyter_settings",
    catalog = "hopsworks",
    schema = "")
@XmlRootElement
@NamedQueries({
  @NamedQuery(name = "JupyterSettings.findAll",
      query = "SELECT j FROM JupyterSettings j")
  ,
    @NamedQuery(name = "JupyterSettings.findByProjectId",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.jupyterSettingsPK.projectId = :projectId")
  ,
    @NamedQuery(name = "JupyterSettings.findByTeamMember",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.jupyterSettingsPK.email = :email")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumTfPs",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numTfPs = :numTfPs")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumTfGpus",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numTfGpus = :numTfGpus")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumMpiNp",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numMpiNp = :numMpiNp")
  ,
    @NamedQuery(name = "JupyterSettings.findByAppmasterCores",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.appmasterCores = :appmasterCores")
  ,
    @NamedQuery(name = "JupyterSettings.findByAppmasterMemory",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.appmasterMemory = :appmasterMemory")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumExecutors",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numExecutors = :numExecutors")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumExecutorCores",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numExecutorCores = :numExecutorCores")
  ,
    @NamedQuery(name = "JupyterSettings.findByExecutorMemory",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.executorMemory = :executorMemory")
  ,
    @NamedQuery(name = "JupyterSettings.findByDynamicInitialExecutors",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.dynamicInitialExecutors = :dynamicInitialExecutors")
  ,
    @NamedQuery(name = "JupyterSettings.findByDynamicMinExecutors",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.dynamicMinExecutors = :dynamicMinExecutors")
  ,
    @NamedQuery(name = "JupyterSettings.findByDynamicMaxExecutors",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.dynamicMaxExecutors = :dynamicMaxExecutors")
  ,
    @NamedQuery(name = "JupyterSettings.findBySecret",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.secret = :secret")
  ,
    @NamedQuery(name = "JupyterSettings.findByLogLevel",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.logLevel = :logLevel")
  ,
    @NamedQuery(name = "JupyterSettings.findByMode",
      query = "SELECT j FROM JupyterSettings j WHERE j.mode = :mode")
  ,
    @NamedQuery(name = "JupyterSettings.findByAdvanced",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.advanced = :advanced")
  ,
    @NamedQuery(name = "JupyterSettings.findByArchives",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.archives = :archives")
  ,
    @NamedQuery(name = "JupyterSettings.findByJars",
      query = "SELECT j FROM JupyterSettings j WHERE j.jars = :jars")
  ,
    @NamedQuery(name = "JupyterSettings.findByFiles",
      query = "SELECT j FROM JupyterSettings j WHERE j.files = :files")
  ,
    @NamedQuery(name = "JupyterSettings.findByPyFiles",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.pyFiles = :pyFiles")
  ,
    @NamedQuery(name = "JupyterSettings.findBySparkParams",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.sparkParams = :sparkParams")
  ,
    @NamedQuery(name = "JupyterSettings.findByUmask",
      query = "SELECT j FROM JupyterSettings j WHERE j.umask = :umask")})
public class JupyterSettings implements Serializable {

  private static final long serialVersionUID = 1L;
  @EmbeddedId
  protected JupyterSettingsPK jupyterSettingsPK;
  @Basic(optional = false)
  @Column(name = "num_tf_ps")
  private int numTfPs = 0;
  @Basic(optional = false)
  @Column(name = "num_tf_gpus")
  private int numTfGpus = 0;
  @Basic(optional = false)
  @Column(name = "num_mpi_np")
  private int numMpiNp = 0;
  @Basic(optional = false)
  @Column(name = "appmaster_cores")
  private int appmasterCores = 1;
  @Basic(optional = false)<commit_msg>HOPSWORKS-459 set correct values for TensorFlowOnSpark and Horovod in JupyterSettings (#876)<commit_after>/*
 * Copyright (C) 2013 - 2018, Logical Clocks AB and RISE SICS AB. All rights reserved
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this
 * software and associated documentation files (the "Software"), to deal in the Software
 * without restriction, including without limitation the rights to use, copy, modify, merge,
 * publish, distribute, sublicense, and/or sell copies of the Software, and to permit
 * persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or
 * substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  OR IMPLIED, INCLUDING
 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

package io.hops.hopsworks.common.dao.jupyter;

import io.hops.hopsworks.common.dao.project.Project;
import io.hops.hopsworks.common.dao.user.Users;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name = "jupyter_settings",
    catalog = "hopsworks",
    schema = "")
@XmlRootElement
@NamedQueries({
  @NamedQuery(name = "JupyterSettings.findAll",
      query = "SELECT j FROM JupyterSettings j")
  ,
    @NamedQuery(name = "JupyterSettings.findByProjectId",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.jupyterSettingsPK.projectId = :projectId")
  ,
    @NamedQuery(name = "JupyterSettings.findByTeamMember",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.jupyterSettingsPK.email = :email")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumTfPs",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numTfPs = :numTfPs")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumTfGpus",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numTfGpus = :numTfGpus")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumMpiNp",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numMpiNp = :numMpiNp")
  ,
    @NamedQuery(name = "JupyterSettings.findByAppmasterCores",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.appmasterCores = :appmasterCores")
  ,
    @NamedQuery(name = "JupyterSettings.findByAppmasterMemory",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.appmasterMemory = :appmasterMemory")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumExecutors",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numExecutors = :numExecutors")
  ,
    @NamedQuery(name = "JupyterSettings.findByNumExecutorCores",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.numExecutorCores = :numExecutorCores")
  ,
    @NamedQuery(name = "JupyterSettings.findByExecutorMemory",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.executorMemory = :executorMemory")
  ,
    @NamedQuery(name = "JupyterSettings.findByDynamicInitialExecutors",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.dynamicInitialExecutors = :dynamicInitialExecutors")
  ,
    @NamedQuery(name = "JupyterSettings.findByDynamicMinExecutors",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.dynamicMinExecutors = :dynamicMinExecutors")
  ,
    @NamedQuery(name = "JupyterSettings.findByDynamicMaxExecutors",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.dynamicMaxExecutors = :dynamicMaxExecutors")
  ,
    @NamedQuery(name = "JupyterSettings.findBySecret",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.secret = :secret")
  ,
    @NamedQuery(name = "JupyterSettings.findByLogLevel",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.logLevel = :logLevel")
  ,
    @NamedQuery(name = "JupyterSettings.findByMode",
      query = "SELECT j FROM JupyterSettings j WHERE j.mode = :mode")
  ,
    @NamedQuery(name = "JupyterSettings.findByAdvanced",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.advanced = :advanced")
  ,
    @NamedQuery(name = "JupyterSettings.findByArchives",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.archives = :archives")
  ,
    @NamedQuery(name = "JupyterSettings.findByJars",
      query = "SELECT j FROM JupyterSettings j WHERE j.jars = :jars")
  ,
    @NamedQuery(name = "JupyterSettings.findByFiles",
      query = "SELECT j FROM JupyterSettings j WHERE j.files = :files")
  ,
    @NamedQuery(name = "JupyterSettings.findByPyFiles",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.pyFiles = :pyFiles")
  ,
    @NamedQuery(name = "JupyterSettings.findBySparkParams",
      query
      = "SELECT j FROM JupyterSettings j WHERE j.sparkParams = :sparkParams")
  ,
    @NamedQuery(name = "JupyterSettings.findByUmask",
      query = "SELECT j FROM JupyterSettings j WHERE j.umask = :umask")})
public class JupyterSettings implements Serializable {

  private static final long serialVersionUID = 1L;
  @EmbeddedId
  protected JupyterSettingsPK jupyterSettingsPK;
  @Basic(optional = false)
  @Column(name = "num_tf_ps")
  private int numTfPs = 1;
  @Basic(optional = false)
  @Column(name = "num_tf_gpus")
  private int numTfGpus = 0;
  @Basic(optional = false)
  @Column(name = "num_mpi_np")
  private int numMpiNp = 1;
  @Basic(optional = false)
  @Column(name = "appmaster_cores")
  private int appmasterCores = 1;
  @Basic(optional = false)
{'fraction_non_alphanumeric': 0.0916673414851405, 'fraction_numerical': 0.0025913029395092722, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5567578', 'n_tokens_mistral': 3952, 'n_tokens_neox': 3892, 'n_words': 1067}