A Distributed DataFrame (DDF) has a number of key properties (metadata, representations, etc.) and capabilities (self-compute basic statistics, aggregations, etc.). This class was designed using the Bridge Pattern to provide clean separation between the abstract concepts and the impleme
| 66 | * </p> |
| 67 | */ |
| 68 | public abstract class DDF extends ALoggable // |
| 69 | implements IGloballyAddressable, IPersistible, ISupportPhantomReference, ISerializable { |
| 70 | |
| 71 | private static final long serialVersionUID = -2198317495102277825L; |
| 72 | |
| 73 | private Date mCreatedTime; |
| 74 | |
| 75 | // Whether the ddf acts as a view for the database table. |
| 76 | private boolean mIsDDFView = false; |
| 77 | |
| 78 | public boolean getIsDDFView() { |
| 79 | return mIsDDFView; |
| 80 | } |
| 81 | |
| 82 | public void setIsDDFView(boolean isDDFView) { |
| 83 | this.mIsDDFView = isDDFView; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * |
| 88 | * @param data |
| 89 | * The DDF data |
| 90 | * @param namespace |
| 91 | * The namespace to place this DDF in. If null, it will be picked up from the DDFManager's current namespace. |
| 92 | * @param name |
| 93 | * The name for this DDF. If null, it will come from the given schema. If that's null, a UUID-based name will |
| 94 | * be generated. |
| 95 | * @param schema |
| 96 | * The {@link Schema} of the new DDF |
| 97 | * @throws DDFException |
| 98 | */ |
| 99 | public DDF(DDFManager manager, Object data, Class<?>[] typeSpecs, |
| 100 | String namespace, String name, Schema schema) |
| 101 | throws DDFException { |
| 102 | |
| 103 | this.initialize(manager, data, typeSpecs, namespace, name, |
| 104 | schema); |
| 105 | } |
| 106 | |
| 107 | abstract public DDF copy() throws DDFException; |
| 108 | |
| 109 | protected DDF(DDFManager manager, DDFManager defaultManagerIfNull) throws DDFException { |
| 110 | this(manager != null ? manager : defaultManagerIfNull, null, null, |
| 111 | null, null, null); |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * This is intended primarily to provide a dummy DDF only. This signature must be provided by each implementor. |
| 116 | * |
| 117 | * @param manager |
| 118 | * @throws DDFException |
| 119 | */ |
| 120 | protected DDF(DDFManager manager) throws DDFException { |
| 121 | this(manager, sDummyManager); |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * cache for data computed from the DDF, e.g., ML models, DDF summary |
nothing calls this directly
no outgoing calls
no test coverage detected