Repository: spark Updated Branches: refs/heads/master 16b6d1861 -> 4e2242bb4
[SPARK-10576] [BUILD] Move .java files out of src/main/scala Move .java files in `src/main/scala` to `src/main/java` root, except for `package-info.java` (to stay next to package.scala) Author: Sean Owen <so...@cloudera.com> Closes #8736 from srowen/SPARK-10576. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4e2242bb Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4e2242bb Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4e2242bb Branch: refs/heads/master Commit: 4e2242bb41dda922573046c00c5142745632f95f Parents: 16b6d18 Author: Sean Owen <so...@cloudera.com> Authored: Mon Sep 14 15:03:51 2015 -0700 Committer: Andrew Or <and...@databricks.com> Committed: Mon Sep 14 15:03:51 2015 -0700 ---------------------------------------------------------------------- .../apache/spark/annotation/AlphaComponent.java | 33 +++++++++ .../apache/spark/annotation/DeveloperApi.java | 35 ++++++++++ .../apache/spark/annotation/Experimental.java | 36 ++++++++++ .../org/apache/spark/annotation/Private.java | 41 +++++++++++ .../apache/spark/annotation/AlphaComponent.java | 33 --------- .../apache/spark/annotation/DeveloperApi.java | 35 ---------- .../apache/spark/annotation/Experimental.java | 36 ---------- .../org/apache/spark/annotation/Private.java | 41 ----------- .../org/apache/spark/graphx/TripletFields.java | 72 ++++++++++++++++++++ .../spark/graphx/impl/EdgeActiveness.java | 34 +++++++++ .../org/apache/spark/graphx/TripletFields.java | 72 -------------------- .../spark/graphx/impl/EdgeActiveness.java | 34 --------- .../spark/sql/types/SQLUserDefinedType.java | 45 ++++++++++++ .../spark/sql/types/SQLUserDefinedType.java | 45 ------------ .../spark/streaming/StreamingContextState.java | 45 ++++++++++++ .../spark/streaming/StreamingContextState.java | 45 ------------ 16 files changed, 341 insertions(+), 341 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/core/src/main/java/org/apache/spark/annotation/AlphaComponent.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/spark/annotation/AlphaComponent.java b/core/src/main/java/org/apache/spark/annotation/AlphaComponent.java new file mode 100644 index 0000000..db7b25c --- /dev/null +++ b/core/src/main/java/org/apache/spark/annotation/AlphaComponent.java @@ -0,0 +1,33 @@ +/* + * 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.spark.annotation; + +import java.lang.annotation.*; + +/** + * A new component of Spark which may have unstable API's. + * + * NOTE: If there exists a Scaladoc comment that immediately precedes this annotation, the first + * line of the comment must be ":: AlphaComponent ::" with no trailing blank line. This is because + * of the known issue that Scaladoc displays only either the annotation or the comment, whichever + * comes first. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, + ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) +public @interface AlphaComponent {} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/core/src/main/java/org/apache/spark/annotation/DeveloperApi.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/spark/annotation/DeveloperApi.java b/core/src/main/java/org/apache/spark/annotation/DeveloperApi.java new file mode 100644 index 0000000..0ecef6d --- /dev/null +++ b/core/src/main/java/org/apache/spark/annotation/DeveloperApi.java @@ -0,0 +1,35 @@ +/* + * 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.spark.annotation; + +import java.lang.annotation.*; + +/** + * A lower-level, unstable API intended for developers. + * + * Developer API's might change or be removed in minor versions of Spark. + * + * NOTE: If there exists a Scaladoc comment that immediately precedes this annotation, the first + * line of the comment must be ":: DeveloperApi ::" with no trailing blank line. This is because + * of the known issue that Scaladoc displays only either the annotation or the comment, whichever + * comes first. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, + ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) +public @interface DeveloperApi {} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/core/src/main/java/org/apache/spark/annotation/Experimental.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/spark/annotation/Experimental.java b/core/src/main/java/org/apache/spark/annotation/Experimental.java new file mode 100644 index 0000000..ff81202 --- /dev/null +++ b/core/src/main/java/org/apache/spark/annotation/Experimental.java @@ -0,0 +1,36 @@ +/* + * 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.spark.annotation; + +import java.lang.annotation.*; + +/** + * An experimental user-facing API. + * + * Experimental API's might change or be removed in minor versions of Spark, or be adopted as + * first-class Spark API's. + * + * NOTE: If there exists a Scaladoc comment that immediately precedes this annotation, the first + * line of the comment must be ":: Experimental ::" with no trailing blank line. This is because + * of the known issue that Scaladoc displays only either the annotation or the comment, whichever + * comes first. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, + ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) +public @interface Experimental {} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/core/src/main/java/org/apache/spark/annotation/Private.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/spark/annotation/Private.java b/core/src/main/java/org/apache/spark/annotation/Private.java new file mode 100644 index 0000000..9082fcf --- /dev/null +++ b/core/src/main/java/org/apache/spark/annotation/Private.java @@ -0,0 +1,41 @@ +/* + * 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.spark.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * A class that is considered private to the internals of Spark -- there is a high-likelihood + * they will be changed in future versions of Spark. + * + * This should be used only when the standard Scala / Java means of protecting classes are + * insufficient. In particular, Java has no equivalent of private[spark], so we use this annotation + * in its place. + * + * NOTE: If there exists a Scaladoc comment that immediately precedes this annotation, the first + * line of the comment must be ":: Private ::" with no trailing blank line. This is because + * of the known issue that Scaladoc displays only either the annotation or the comment, whichever + * comes first. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, + ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) +public @interface Private {} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/core/src/main/scala/org/apache/spark/annotation/AlphaComponent.java ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/annotation/AlphaComponent.java b/core/src/main/scala/org/apache/spark/annotation/AlphaComponent.java deleted file mode 100644 index db7b25c..0000000 --- a/core/src/main/scala/org/apache/spark/annotation/AlphaComponent.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.spark.annotation; - -import java.lang.annotation.*; - -/** - * A new component of Spark which may have unstable API's. - * - * NOTE: If there exists a Scaladoc comment that immediately precedes this annotation, the first - * line of the comment must be ":: AlphaComponent ::" with no trailing blank line. This is because - * of the known issue that Scaladoc displays only either the annotation or the comment, whichever - * comes first. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, - ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) -public @interface AlphaComponent {} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/core/src/main/scala/org/apache/spark/annotation/DeveloperApi.java ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/annotation/DeveloperApi.java b/core/src/main/scala/org/apache/spark/annotation/DeveloperApi.java deleted file mode 100644 index 0ecef6d..0000000 --- a/core/src/main/scala/org/apache/spark/annotation/DeveloperApi.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.spark.annotation; - -import java.lang.annotation.*; - -/** - * A lower-level, unstable API intended for developers. - * - * Developer API's might change or be removed in minor versions of Spark. - * - * NOTE: If there exists a Scaladoc comment that immediately precedes this annotation, the first - * line of the comment must be ":: DeveloperApi ::" with no trailing blank line. This is because - * of the known issue that Scaladoc displays only either the annotation or the comment, whichever - * comes first. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, - ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) -public @interface DeveloperApi {} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/core/src/main/scala/org/apache/spark/annotation/Experimental.java ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/annotation/Experimental.java b/core/src/main/scala/org/apache/spark/annotation/Experimental.java deleted file mode 100644 index ff81202..0000000 --- a/core/src/main/scala/org/apache/spark/annotation/Experimental.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.spark.annotation; - -import java.lang.annotation.*; - -/** - * An experimental user-facing API. - * - * Experimental API's might change or be removed in minor versions of Spark, or be adopted as - * first-class Spark API's. - * - * NOTE: If there exists a Scaladoc comment that immediately precedes this annotation, the first - * line of the comment must be ":: Experimental ::" with no trailing blank line. This is because - * of the known issue that Scaladoc displays only either the annotation or the comment, whichever - * comes first. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, - ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) -public @interface Experimental {} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/core/src/main/scala/org/apache/spark/annotation/Private.java ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/annotation/Private.java b/core/src/main/scala/org/apache/spark/annotation/Private.java deleted file mode 100644 index 9082fcf..0000000 --- a/core/src/main/scala/org/apache/spark/annotation/Private.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.spark.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * A class that is considered private to the internals of Spark -- there is a high-likelihood - * they will be changed in future versions of Spark. - * - * This should be used only when the standard Scala / Java means of protecting classes are - * insufficient. In particular, Java has no equivalent of private[spark], so we use this annotation - * in its place. - * - * NOTE: If there exists a Scaladoc comment that immediately precedes this annotation, the first - * line of the comment must be ":: Private ::" with no trailing blank line. This is because - * of the known issue that Scaladoc displays only either the annotation or the comment, whichever - * comes first. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, - ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) -public @interface Private {} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/graphx/src/main/java/org/apache/spark/graphx/TripletFields.java ---------------------------------------------------------------------- diff --git a/graphx/src/main/java/org/apache/spark/graphx/TripletFields.java b/graphx/src/main/java/org/apache/spark/graphx/TripletFields.java new file mode 100644 index 0000000..7eb4ae0 --- /dev/null +++ b/graphx/src/main/java/org/apache/spark/graphx/TripletFields.java @@ -0,0 +1,72 @@ +/* + * 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.spark.graphx; + +import java.io.Serializable; + +/** + * Represents a subset of the fields of an [[EdgeTriplet]] or [[EdgeContext]]. This allows the + * system to populate only those fields for efficiency. + */ +public class TripletFields implements Serializable { + + /** Indicates whether the source vertex attribute is included. */ + public final boolean useSrc; + + /** Indicates whether the destination vertex attribute is included. */ + public final boolean useDst; + + /** Indicates whether the edge attribute is included. */ + public final boolean useEdge; + + /** Constructs a default TripletFields in which all fields are included. */ + public TripletFields() { + this(true, true, true); + } + + public TripletFields(boolean useSrc, boolean useDst, boolean useEdge) { + this.useSrc = useSrc; + this.useDst = useDst; + this.useEdge = useEdge; + } + + /** + * None of the triplet fields are exposed. + */ + public static final TripletFields None = new TripletFields(false, false, false); + + /** + * Expose only the edge field and not the source or destination field. + */ + public static final TripletFields EdgeOnly = new TripletFields(false, false, true); + + /** + * Expose the source and edge fields but not the destination field. (Same as Src) + */ + public static final TripletFields Src = new TripletFields(true, false, true); + + /** + * Expose the destination and edge fields but not the source field. (Same as Dst) + */ + public static final TripletFields Dst = new TripletFields(false, true, true); + + /** + * Expose all the fields (source, edge, and destination). + */ + public static final TripletFields All = new TripletFields(true, true, true); +} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/graphx/src/main/java/org/apache/spark/graphx/impl/EdgeActiveness.java ---------------------------------------------------------------------- diff --git a/graphx/src/main/java/org/apache/spark/graphx/impl/EdgeActiveness.java b/graphx/src/main/java/org/apache/spark/graphx/impl/EdgeActiveness.java new file mode 100644 index 0000000..377ae84 --- /dev/null +++ b/graphx/src/main/java/org/apache/spark/graphx/impl/EdgeActiveness.java @@ -0,0 +1,34 @@ +/* + * 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.spark.graphx.impl; + +/** + * Criteria for filtering edges based on activeness. For internal use only. + */ +public enum EdgeActiveness { + /** Neither the source vertex nor the destination vertex need be active. */ + Neither, + /** The source vertex must be active. */ + SrcOnly, + /** The destination vertex must be active. */ + DstOnly, + /** Both vertices must be active. */ + Both, + /** At least one vertex must be active. */ + Either +} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java ---------------------------------------------------------------------- diff --git a/graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java b/graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java deleted file mode 100644 index 7eb4ae0..0000000 --- a/graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.spark.graphx; - -import java.io.Serializable; - -/** - * Represents a subset of the fields of an [[EdgeTriplet]] or [[EdgeContext]]. This allows the - * system to populate only those fields for efficiency. - */ -public class TripletFields implements Serializable { - - /** Indicates whether the source vertex attribute is included. */ - public final boolean useSrc; - - /** Indicates whether the destination vertex attribute is included. */ - public final boolean useDst; - - /** Indicates whether the edge attribute is included. */ - public final boolean useEdge; - - /** Constructs a default TripletFields in which all fields are included. */ - public TripletFields() { - this(true, true, true); - } - - public TripletFields(boolean useSrc, boolean useDst, boolean useEdge) { - this.useSrc = useSrc; - this.useDst = useDst; - this.useEdge = useEdge; - } - - /** - * None of the triplet fields are exposed. - */ - public static final TripletFields None = new TripletFields(false, false, false); - - /** - * Expose only the edge field and not the source or destination field. - */ - public static final TripletFields EdgeOnly = new TripletFields(false, false, true); - - /** - * Expose the source and edge fields but not the destination field. (Same as Src) - */ - public static final TripletFields Src = new TripletFields(true, false, true); - - /** - * Expose the destination and edge fields but not the source field. (Same as Dst) - */ - public static final TripletFields Dst = new TripletFields(false, true, true); - - /** - * Expose all the fields (source, edge, and destination). - */ - public static final TripletFields All = new TripletFields(true, true, true); -} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgeActiveness.java ---------------------------------------------------------------------- diff --git a/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgeActiveness.java b/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgeActiveness.java deleted file mode 100644 index 377ae84..0000000 --- a/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgeActiveness.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.spark.graphx.impl; - -/** - * Criteria for filtering edges based on activeness. For internal use only. - */ -public enum EdgeActiveness { - /** Neither the source vertex nor the destination vertex need be active. */ - Neither, - /** The source vertex must be active. */ - SrcOnly, - /** The destination vertex must be active. */ - DstOnly, - /** Both vertices must be active. */ - Both, - /** At least one vertex must be active. */ - Either -} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/sql/catalyst/src/main/java/org/apache/spark/sql/types/SQLUserDefinedType.java ---------------------------------------------------------------------- diff --git a/sql/catalyst/src/main/java/org/apache/spark/sql/types/SQLUserDefinedType.java b/sql/catalyst/src/main/java/org/apache/spark/sql/types/SQLUserDefinedType.java new file mode 100644 index 0000000..df64a87 --- /dev/null +++ b/sql/catalyst/src/main/java/org/apache/spark/sql/types/SQLUserDefinedType.java @@ -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.spark.sql.types; + +import java.lang.annotation.*; + +import org.apache.spark.annotation.DeveloperApi; + +/** + * ::DeveloperApi:: + * A user-defined type which can be automatically recognized by a SQLContext and registered. + * <p> + * WARNING: This annotation will only work if both Java and Scala reflection return the same class + * names (after erasure) for the UDT. This will NOT be the case when, e.g., the UDT class + * is enclosed in an object (a singleton). + * <p> + * WARNING: UDTs are currently only supported from Scala. + */ +// TODO: Should I used @Documented ? +@DeveloperApi +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface SQLUserDefinedType { + + /** + * Returns an instance of the UserDefinedType which can serialize and deserialize the user + * class to and from Catalyst built-in types. + */ + Class<? extends UserDefinedType<?> > udt(); +} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/sql/catalyst/src/main/scala/org/apache/spark/sql/types/SQLUserDefinedType.java ---------------------------------------------------------------------- diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/types/SQLUserDefinedType.java b/sql/catalyst/src/main/scala/org/apache/spark/sql/types/SQLUserDefinedType.java deleted file mode 100644 index df64a87..0000000 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/types/SQLUserDefinedType.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.spark.sql.types; - -import java.lang.annotation.*; - -import org.apache.spark.annotation.DeveloperApi; - -/** - * ::DeveloperApi:: - * A user-defined type which can be automatically recognized by a SQLContext and registered. - * <p> - * WARNING: This annotation will only work if both Java and Scala reflection return the same class - * names (after erasure) for the UDT. This will NOT be the case when, e.g., the UDT class - * is enclosed in an object (a singleton). - * <p> - * WARNING: UDTs are currently only supported from Scala. - */ -// TODO: Should I used @Documented ? -@DeveloperApi -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface SQLUserDefinedType { - - /** - * Returns an instance of the UserDefinedType which can serialize and deserialize the user - * class to and from Catalyst built-in types. - */ - Class<? extends UserDefinedType<?> > udt(); -} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/streaming/src/main/java/org/apache/spark/streaming/StreamingContextState.java ---------------------------------------------------------------------- diff --git a/streaming/src/main/java/org/apache/spark/streaming/StreamingContextState.java b/streaming/src/main/java/org/apache/spark/streaming/StreamingContextState.java new file mode 100644 index 0000000..d7b6393 --- /dev/null +++ b/streaming/src/main/java/org/apache/spark/streaming/StreamingContextState.java @@ -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.spark.streaming; + +import org.apache.spark.annotation.DeveloperApi; + +/** + * :: DeveloperApi :: + * + * Represents the state of a StreamingContext. + */ +@DeveloperApi +public enum StreamingContextState { + /** + * The context has been created, but not been started yet. + * Input DStreams, transformations and output operations can be created on the context. + */ + INITIALIZED, + + /** + * The context has been started, and been not stopped. + * Input DStreams, transformations and output operations cannot be created on the context. + */ + ACTIVE, + + /** + * The context has been stopped and cannot be used any more. + */ + STOPPED +} http://git-wip-us.apache.org/repos/asf/spark/blob/4e2242bb/streaming/src/main/scala/org/apache/spark/streaming/StreamingContextState.java ---------------------------------------------------------------------- diff --git a/streaming/src/main/scala/org/apache/spark/streaming/StreamingContextState.java b/streaming/src/main/scala/org/apache/spark/streaming/StreamingContextState.java deleted file mode 100644 index d7b6393..0000000 --- a/streaming/src/main/scala/org/apache/spark/streaming/StreamingContextState.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.spark.streaming; - -import org.apache.spark.annotation.DeveloperApi; - -/** - * :: DeveloperApi :: - * - * Represents the state of a StreamingContext. - */ -@DeveloperApi -public enum StreamingContextState { - /** - * The context has been created, but not been started yet. - * Input DStreams, transformations and output operations can be created on the context. - */ - INITIALIZED, - - /** - * The context has been started, and been not stopped. - * Input DStreams, transformations and output operations cannot be created on the context. - */ - ACTIVE, - - /** - * The context has been stopped and cannot be used any more. - */ - STOPPED -} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org