Add jenkinsfile for pipeline build and dockerfile for build

Signed-off-by: brian <brian@brutex.de>
master
Brian Rosenberger 2022-10-24 17:32:47 +02:00
parent 6044c1c53a
commit 638f13e681
4 changed files with 164 additions and 0 deletions

View File

@ -0,0 +1,66 @@
/*
*
* ******************************************************************************
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*
*/
package net.brutex.cavis.dvec.api;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import net.brutex.cavis.dvec.api.exceptions.DVecException;
/**
* Abtract implementation of the Field interface {@see FieldInterface}, that handles all data storage
* in memory and adds basic error handling.
*
* @author Brian Rosenberger
* @since 1.0
*/
public abstract class Field<T extends Buffer> implements FieldInterface<T> {
/**
* {@inheritDoc}
*
* @param start Index of starting position, zero based
* @param length how many fields to read
* @return the list of Buffer
*/
@Override
public T read(long start, long length) throws DVecException {
if (start<0 || start>internalStorage.capacity()-1 ) {
throw new DVecException("Read on Field start position is out of bounds.");
}
if (start+length> internalStorage.capacity()) {
throw new DVecException("Read on Field exceeds field length");
}
return null;
}
@Override
public void write(long pos, T buffer) {
}
private ByteBuffer internalStorage = null;
}

View File

@ -0,0 +1,31 @@
/*
*
* ******************************************************************************
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*
*/
package net.brutex.cavis.dvec.api;
/**
* tbd.
* @author Brian Rosenberger
*
*/
public interface FieldMetadata {
}

View File

@ -0,0 +1,32 @@
/*
*
* ******************************************************************************
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*
*/
package net.brutex.cavis.dvec.api.exceptions;
import lombok.Getter;
public class DVecException extends Exception {
@Getter private final String message;
public DVecException(String message) {
this.message = message;
}
}

View File

@ -0,0 +1,35 @@
/*
*
* ******************************************************************************
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*
*/
/**
* <p>
* The data vectorization api (dvec-api) defines a data structure in analogy to Hadoop and is
* derived from the dl4j datavec library.<br> The main concept is around
* </p>
* <ul>
* <li>InputFormat</li>
* <li>InputSplit</li>
* <li>RecordReader, Records and Writable</li>
* </ul>
*
* @author Brian Rosenberger &lt;bru@brutex.de&gt;
*/
package net.brutex.cavis.dvec.api;