Back to home page

OSCL-LXR

 
 

    


0001 #
0002 # Licensed to the Apache Software Foundation (ASF) under one or more
0003 # contributor license agreements.  See the NOTICE file distributed with
0004 # this work for additional information regarding copyright ownership.
0005 # The ASF licenses this file to You under the Apache License, Version 2.0
0006 # (the "License"); you may not use this file except in compliance with
0007 # the License.  You may obtain a copy of the License at
0008 #
0009 #    http://www.apache.org/licenses/LICENSE-2.0
0010 #
0011 # Unless required by applicable law or agreed to in writing, software
0012 # distributed under the License is distributed on an "AS IS" BASIS,
0013 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014 # See the License for the specific language governing permissions and
0015 # limitations under the License.
0016 #
0017 
0018 # Imports from base R
0019 # Do not include stats:: "rpois", "runif" - causes error at runtime
0020 importFrom("methods", "setGeneric", "setMethod", "setOldClass")
0021 importFrom("methods", "is", "new", "signature", "show")
0022 importFrom("stats", "gaussian", "setNames")
0023 importFrom("utils", "download.file", "object.size", "packageVersion", "tail", "untar")
0024 
0025 # Disable native libraries till we figure out how to package it
0026 # See SPARKR-7839
0027 #useDynLib(SparkR, stringHashCode)
0028 
0029 # S3 methods exported
0030 export("sparkR.session")
0031 export("sparkR.init")
0032 export("sparkR.session.stop")
0033 export("sparkR.stop")
0034 export("sparkR.conf")
0035 export("sparkR.version")
0036 export("sparkR.uiWebUrl")
0037 export("print.jobj")
0038 
0039 export("sparkR.newJObject")
0040 export("sparkR.callJMethod")
0041 export("sparkR.callJStatic")
0042 
0043 export("install.spark")
0044 
0045 export("sparkRSQL.init",
0046        "sparkRHive.init")
0047 
0048 # MLlib integration
0049 exportMethods("glm",
0050               "spark.glm",
0051               "predict",
0052               "summary",
0053               "spark.kmeans",
0054               "fitted",
0055               "spark.mlp",
0056               "spark.naiveBayes",
0057               "spark.survreg",
0058               "spark.lda",
0059               "spark.posterior",
0060               "spark.perplexity",
0061               "spark.isoreg",
0062               "spark.gaussianMixture",
0063               "spark.als",
0064               "spark.kstest",
0065               "spark.logit",
0066               "spark.decisionTree",
0067               "spark.randomForest",
0068               "spark.gbt",
0069               "spark.bisectingKmeans",
0070               "spark.svmLinear",
0071               "spark.fpGrowth",
0072               "spark.freqItemsets",
0073               "spark.associationRules",
0074               "spark.findFrequentSequentialPatterns",
0075               "spark.assignClusters")
0076 
0077 # Job group lifecycle management methods
0078 export("setJobGroup",
0079        "clearJobGroup",
0080        "cancelJobGroup",
0081        "setJobDescription",
0082        "setLocalProperty",
0083        "getLocalProperty")
0084 
0085 # Export Utility methods
0086 export("setLogLevel")
0087 
0088 exportClasses("SparkDataFrame")
0089 
0090 exportMethods("arrange",
0091               "as.data.frame",
0092               "attach",
0093               "broadcast",
0094               "cache",
0095               "checkpoint",
0096               "coalesce",
0097               "collect",
0098               "colnames",
0099               "colnames<-",
0100               "coltypes",
0101               "coltypes<-",
0102               "columns",
0103               "count",
0104               "cov",
0105               "corr",
0106               "covar_samp",
0107               "covar_pop",
0108               "createOrReplaceTempView",
0109               "crossJoin",
0110               "crosstab",
0111               "cube",
0112               "dapply",
0113               "dapplyCollect",
0114               "describe",
0115               "dim",
0116               "distinct",
0117               "drop",
0118               "dropDuplicates",
0119               "dropna",
0120               "dtypes",
0121               "except",
0122               "exceptAll",
0123               "explain",
0124               "fillna",
0125               "filter",
0126               "first",
0127               "freqItems",
0128               "gapply",
0129               "gapplyCollect",
0130               "getNumPartitions",
0131               "group_by",
0132               "groupBy",
0133               "head",
0134               "hint",
0135               "insertInto",
0136               "intersect",
0137               "intersectAll",
0138               "isLocal",
0139               "isStreaming",
0140               "join",
0141               "limit",
0142               "localCheckpoint",
0143               "merge",
0144               "mutate",
0145               "na.omit",
0146               "names",
0147               "names<-",
0148               "ncol",
0149               "nrow",
0150               "orderBy",
0151               "persist",
0152               "printSchema",
0153               "randomSplit",
0154               "rbind",
0155               "registerTempTable",
0156               "rename",
0157               "repartition",
0158               "repartitionByRange",
0159               "rollup",
0160               "sample",
0161               "sample_frac",
0162               "sampleBy",
0163               "saveAsTable",
0164               "saveDF",
0165               "schema",
0166               "select",
0167               "selectExpr",
0168               "show",
0169               "showDF",
0170               "storageLevel",
0171               "subset",
0172               "summarize",
0173               "summary",
0174               "take",
0175               "toJSON",
0176               "transform",
0177               "union",
0178               "unionAll",
0179               "unionByName",
0180               "unique",
0181               "unpersist",
0182               "where",
0183               "with",
0184               "withColumn",
0185               "withColumnRenamed",
0186               "withWatermark",
0187               "write.df",
0188               "write.jdbc",
0189               "write.json",
0190               "write.orc",
0191               "write.parquet",
0192               "write.stream",
0193               "write.text",
0194               "write.ml")
0195 
0196 exportClasses("Column")
0197 
0198 exportMethods("%<=>%",
0199               "%in%",
0200               "abs",
0201               "acos",
0202               "add_months",
0203               "alias",
0204               "approx_count_distinct",
0205               "approxCountDistinct",
0206               "approxQuantile",
0207               "array_contains",
0208               "array_distinct",
0209               "array_except",
0210               "array_intersect",
0211               "array_join",
0212               "array_max",
0213               "array_min",
0214               "array_position",
0215               "array_remove",
0216               "array_repeat",
0217               "array_sort",
0218               "arrays_overlap",
0219               "array_union",
0220               "arrays_zip",
0221               "asc",
0222               "ascii",
0223               "asin",
0224               "atan",
0225               "atan2",
0226               "avg",
0227               "base64",
0228               "between",
0229               "bin",
0230               "bitwiseNOT",
0231               "bround",
0232               "cast",
0233               "cbrt",
0234               "ceil",
0235               "ceiling",
0236               "collect_list",
0237               "collect_set",
0238               "column",
0239               "concat",
0240               "concat_ws",
0241               "contains",
0242               "conv",
0243               "cos",
0244               "cosh",
0245               "count",
0246               "countDistinct",
0247               "crc32",
0248               "create_array",
0249               "create_map",
0250               "current_date",
0251               "current_timestamp",
0252               "hash",
0253               "cume_dist",
0254               "date_add",
0255               "date_format",
0256               "date_sub",
0257               "date_trunc",
0258               "datediff",
0259               "dayofmonth",
0260               "dayofweek",
0261               "dayofyear",
0262               "decode",
0263               "degrees",
0264               "dense_rank",
0265               "desc",
0266               "element_at",
0267               "encode",
0268               "endsWith",
0269               "exp",
0270               "explode",
0271               "explode_outer",
0272               "expm1",
0273               "expr",
0274               "factorial",
0275               "first",
0276               "flatten",
0277               "floor",
0278               "format_number",
0279               "format_string",
0280               "from_csv",
0281               "from_json",
0282               "from_unixtime",
0283               "from_utc_timestamp",
0284               "getField",
0285               "getItem",
0286               "greatest",
0287               "grouping_bit",
0288               "grouping_id",
0289               "hex",
0290               "histogram",
0291               "hour",
0292               "hypot",
0293               "ifelse",
0294               "initcap",
0295               "input_file_name",
0296               "instr",
0297               "isNaN",
0298               "isNotNull",
0299               "isNull",
0300               "is.nan",
0301               "isnan",
0302               "kurtosis",
0303               "lag",
0304               "last",
0305               "last_day",
0306               "lead",
0307               "least",
0308               "length",
0309               "levenshtein",
0310               "like",
0311               "lit",
0312               "locate",
0313               "log",
0314               "log10",
0315               "log1p",
0316               "log2",
0317               "lower",
0318               "lpad",
0319               "ltrim",
0320               "map_concat",
0321               "map_entries",
0322               "map_from_arrays",
0323               "map_from_entries",
0324               "map_keys",
0325               "map_values",
0326               "max",
0327               "md5",
0328               "mean",
0329               "min",
0330               "minute",
0331               "monotonically_increasing_id",
0332               "month",
0333               "months_between",
0334               "n",
0335               "n_distinct",
0336               "nanvl",
0337               "negate",
0338               "next_day",
0339               "not",
0340               "ntile",
0341               "otherwise",
0342               "over",
0343               "overlay",
0344               "percent_rank",
0345               "pmod",
0346               "posexplode",
0347               "posexplode_outer",
0348               "quarter",
0349               "radians",
0350               "rand",
0351               "randn",
0352               "rank",
0353               "regexp_extract",
0354               "regexp_replace",
0355               "repeat_string",
0356               "reverse",
0357               "rint",
0358               "rlike",
0359               "round",
0360               "row_number",
0361               "rpad",
0362               "rtrim",
0363               "schema_of_csv",
0364               "schema_of_json",
0365               "second",
0366               "sha1",
0367               "sha2",
0368               "shiftLeft",
0369               "shiftRight",
0370               "shiftRightUnsigned",
0371               "shuffle",
0372               "sd",
0373               "sign",
0374               "signum",
0375               "sin",
0376               "sinh",
0377               "size",
0378               "skewness",
0379               "slice",
0380               "sort_array",
0381               "soundex",
0382               "spark_partition_id",
0383               "split_string",
0384               "stddev",
0385               "stddev_pop",
0386               "stddev_samp",
0387               "struct",
0388               "sqrt",
0389               "startsWith",
0390               "substr",
0391               "substring_index",
0392               "sum",
0393               "sumDistinct",
0394               "tan",
0395               "tanh",
0396               "toDegrees",
0397               "toRadians",
0398               "to_csv",
0399               "to_date",
0400               "to_json",
0401               "to_timestamp",
0402               "to_utc_timestamp",
0403               "translate",
0404               "trim",
0405               "trunc",
0406               "unbase64",
0407               "unhex",
0408               "unix_timestamp",
0409               "upper",
0410               "var",
0411               "variance",
0412               "var_pop",
0413               "var_samp",
0414               "weekofyear",
0415               "when",
0416               "window",
0417               "xxhash64",
0418               "year")
0419 
0420 exportClasses("GroupedData")
0421 exportMethods("agg")
0422 exportMethods("pivot")
0423 
0424 export("as.DataFrame",
0425        "cacheTable",
0426        "clearCache",
0427        "createDataFrame",
0428        "createExternalTable",
0429        "createTable",
0430        "currentDatabase",
0431        "dropTempTable",
0432        "dropTempView",
0433        "listColumns",
0434        "listDatabases",
0435        "listFunctions",
0436        "listTables",
0437        "loadDF",
0438        "read.df",
0439        "read.jdbc",
0440        "read.json",
0441        "read.orc",
0442        "read.parquet",
0443        "read.stream",
0444        "read.text",
0445        "recoverPartitions",
0446        "refreshByPath",
0447        "refreshTable",
0448        "setCheckpointDir",
0449        "setCurrentDatabase",
0450        "spark.lapply",
0451        "spark.addFile",
0452        "spark.getSparkFilesRootDirectory",
0453        "spark.getSparkFiles",
0454        "sql",
0455        "str",
0456        "tableToDF",
0457        "tableNames",
0458        "tables",
0459        "uncacheTable",
0460        "print.summary.GeneralizedLinearRegressionModel",
0461        "read.ml",
0462        "print.summary.KSTest",
0463        "print.summary.DecisionTreeRegressionModel",
0464        "print.summary.DecisionTreeClassificationModel",
0465        "print.summary.RandomForestRegressionModel",
0466        "print.summary.RandomForestClassificationModel",
0467        "print.summary.GBTRegressionModel",
0468        "print.summary.GBTClassificationModel")
0469 
0470 export("structField",
0471        "structField.jobj",
0472        "structField.character",
0473        "print.structField",
0474        "structType",
0475        "structType.character",
0476        "structType.jobj",
0477        "structType.structField",
0478        "print.structType")
0479 
0480 exportClasses("WindowSpec")
0481 
0482 export("partitionBy",
0483        "rowsBetween",
0484        "rangeBetween")
0485 
0486 export("windowPartitionBy",
0487        "windowOrderBy")
0488 
0489 exportClasses("StreamingQuery")
0490 
0491 export("awaitTermination",
0492        "isActive",
0493        "lastProgress",
0494        "queryName",
0495        "status",
0496        "stopQuery")
0497 
0498 
0499 S3method(print, jobj)
0500 S3method(print, structField)
0501 S3method(print, structType)
0502 S3method(print, summary.GeneralizedLinearRegressionModel)
0503 S3method(print, summary.KSTest)
0504 S3method(print, summary.DecisionTreeRegressionModel)
0505 S3method(print, summary.DecisionTreeClassificationModel)
0506 S3method(print, summary.RandomForestRegressionModel)
0507 S3method(print, summary.RandomForestClassificationModel)
0508 S3method(print, summary.GBTRegressionModel)
0509 S3method(print, summary.GBTClassificationModel)
0510 S3method(structField, character)
0511 S3method(structField, jobj)
0512 S3method(structType, character)
0513 S3method(structType, jobj)
0514 S3method(structType, structField)