Skip to content

Commit

Permalink
feat: updating styles
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Jan 22, 2024
1 parent 7e039e5 commit e07b445
Show file tree
Hide file tree
Showing 38 changed files with 154 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
* String constants used for metadata returned on Vectors.
*/
public class Constants {
private Constants() {}
private Constants() {
}

public static final String SQL_CATALOG_NAME_KEY = "SQL_CATALOG_NAME";
public static final String SQL_SCHEMA_NAME_KEY = "SQL_SCHEMA_NAME";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLExceptio
}

@Override
public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {}
public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
}

@Override
public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
Expand All @@ -241,7 +242,8 @@ public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws S
}

@Override
public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException {}
public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException {
}

@Override
public void setURL(int parameterIndex, URL x) throws SQLException {
Expand All @@ -259,62 +261,80 @@ public void setRowId(int parameterIndex, RowId x) throws SQLException {
}

@Override
public void setNString(int parameterIndex, String value) throws SQLException {}
public void setNString(int parameterIndex, String value) throws SQLException {
}

@Override
public void setNCharacterStream(int parameterIndex, Reader value, long length)
throws SQLException {}
throws SQLException {
}

@Override
public void setNClob(int parameterIndex, NClob value) throws SQLException {}
public void setNClob(int parameterIndex, NClob value) throws SQLException {
}

@Override
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {}
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
}

@Override
public void setBlob(int parameterIndex, InputStream inputStream, long length)
throws SQLException {}
throws SQLException {
}

@Override
public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {}
public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
}

@Override
public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {}
public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
}

@Override
public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)
throws SQLException {}
throws SQLException {
}

@Override
public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {}
public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {
}

@Override
public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {}
public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {
}

@Override
public void setCharacterStream(int parameterIndex, Reader reader, long length)
throws SQLException {}
throws SQLException {
}

@Override
public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {}
public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
}

@Override
public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {}
public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
}

@Override
public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {}
public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
}

@Override
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {}
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
}

@Override
public void setClob(int parameterIndex, Reader reader) throws SQLException {}
public void setClob(int parameterIndex, Reader reader) throws SQLException {
}

@Override
public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {}
public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
}

@Override
public void setNClob(int parameterIndex, Reader reader) throws SQLException {}
public void setNClob(int parameterIndex, Reader reader) throws SQLException {
}

@Override
public ResultSet executeQuery(String sql) throws SQLException {
Expand All @@ -327,7 +347,8 @@ public int executeUpdate(String sql) throws SQLException {
}

@Override
public void close() throws SQLException {}
public void close() throws SQLException {
}

@Override
public int getMaxFieldSize() throws SQLException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ public static class MockColumnMetaData {
private int displaySize;


private MockColumnMetaData() {}
private MockColumnMetaData() {
}

private String getLabel() {
return label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class OrcJniUtils {
private static final String LIBRARY_NAME = "arrow_orc_jni";
private static boolean isLoaded = false;

private OrcJniUtils() {}
private OrcJniUtils() {
}

static void loadOrcAdapterLibraryFromJar()
throws IOException, IllegalAccessException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ public ClientStreamListener getWriter() {
*/
public void getResult() {
// After exchange is complete, make sure stream is drained to propagate errors through reader
while (reader.next()) { };
while (reader.next()) {
}
}

/** Shut down the streams in this call. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public void enterIdle() {
}
}

private FlightGrpcUtils() {}
private FlightGrpcUtils() {
}

/**
* Creates a Flight service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ public void close() throws Exception {
}
}
// Drain the stream without the lock (as next() implicitly needs the lock)
while (next()) { }
while (next()) {
}
} catch (FlightRuntimeException e) {
suppressor = e;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,6 @@ default void start(VectorSchemaRoot root, DictionaryProvider dictionaries) {
* <p>The default value can be toggled globally by setting the JVM property arrow.flight.enable_zero_copy_write
* or the environment variable ARROW_FLIGHT_ENABLE_ZERO_COPY_WRITE.
*/
default void setUseZeroCopy(boolean enabled) {}
default void setUseZeroCopy(boolean enabled) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ public byte[] parseBytes(byte[] serialized) {

public static final Context.Key<String> PEER_IDENTITY_KEY = Context.keyWithDefault("arrow-flight-peer-identity", "");

private AuthConstants() {}
private AuthConstants() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ public boolean hasNext() {
@Override
public void onError(Throwable t) {
completed = true;
while (future == null) {/* busy wait */}
while (future == null) {
/* busy wait */
}
future.cancel(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,12 @@ public void onBeforeSendingHeaders(CallHeaders outgoingHeaders) {
}

@Override
public void onCallCompleted(CallStatus status) {}
public void onCallCompleted(CallStatus status) {
}

@Override
public void onCallErrored(Throwable err) {}
public void onCallErrored(Throwable err) {
}
}

static class MultiHeaderClientMiddlewareFactory implements FlightClientMiddleware.Factory {
Expand Down Expand Up @@ -356,6 +358,7 @@ public void onHeadersReceived(CallHeaders incomingHeaders) {
}

@Override
public void onCallCompleted(CallStatus status) {}
public void onCallCompleted(CallStatus status) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public FlightProducer producer(BufferAllocator allocator, Location location) thr
}

@Override
public void buildServer(FlightServer.Builder builder) throws Exception {}
public void buildServer(FlightServer.Builder builder) throws Exception {
}

@Override
public void client(BufferAllocator allocator, Location location, FlightClient client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public final class IntervalStringUtils {
/**
* Constructor Method of class.
*/
private IntervalStringUtils( ) {}
private IntervalStringUtils( ) {
}

/**
* Formats a period similar to Oracle INTERVAL YEAR TO MONTH data type<br>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void testGetDefaultKeyStoreInstancePassword() throws IOException,

keyStoreMockedStatic
.when(() -> ClientAuthenticationUtils.getDefaultKeyStoreInstance("changeit"))
.thenReturn(keyStoreMock);
.thenReturn(keyStoreMock);
KeyStore receiveKeyStore = ClientAuthenticationUtils.getDefaultKeyStoreInstance("changeit");
Assert.assertEquals(receiveKeyStore, keyStoreMock);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public interface AllocationListener {
*
* @param size the buffer size being allocated
*/
default void onPreAllocation(long size) {}
default void onPreAllocation(long size) {
}

/**
* Called each time a new buffer has been allocated.
Expand All @@ -43,15 +44,17 @@ default void onPreAllocation(long size) {}
*
* @param size the buffer size being allocated
*/
default void onAllocation(long size) {}
default void onAllocation(long size) {
}

/**
* Informed each time a buffer is released from allocation.
*
* <p>An exception cannot be thrown by this method.
* @param size The size of the buffer being released.
*/
default void onRelease(long size) {}
default void onRelease(long size) {
}


/**
Expand All @@ -73,13 +76,15 @@ default boolean onFailedAllocation(long size, AllocationOutcome outcome) {
* @param parentAllocator The parent allocator to which a child was added
* @param childAllocator The child allocator that was just added
*/
default void onChildAdded(BufferAllocator parentAllocator, BufferAllocator childAllocator) {}
default void onChildAdded(BufferAllocator parentAllocator, BufferAllocator childAllocator) {
}

/**
* Called immediately after a child allocator was removed from the parent allocator.
*
* @param parentAllocator The parent allocator from which a child was removed
* @param childAllocator The child allocator that was just removed
*/
default void onChildRemoved(BufferAllocator parentAllocator, BufferAllocator childAllocator) {}
default void onChildRemoved(BufferAllocator parentAllocator, BufferAllocator childAllocator) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -702,18 +702,18 @@ private void verifyAllocator(
void print(StringBuilder sb, int level, Verbosity verbosity) {

CommonUtil.indent(sb, level)
.append("Allocator(")
.append(name)
.append(") ")
.append(reservation)
.append('/')
.append(getAllocatedMemory())
.append('/')
.append(getPeakMemoryAllocation())
.append('/')
.append(getLimit())
.append(" (res/actual/peak/limit)")
.append('\n');
.append("Allocator(")
.append(name)
.append(") ")
.append(reservation)
.append('/')
.append(getAllocatedMemory())
.append('/')
.append(getPeakMemoryAllocation())
.append('/')
.append(getLimit())
.append(" (res/actual/peak/limit)")
.append('\n');

if (DEBUG) {
CommonUtil.indent(sb, level + 1).append(String.format("child allocators: %d\n", childAllocators.size()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,29 +478,29 @@ public long getAccountedSize() {
*/
void print(StringBuilder sb, int indent, BaseAllocator.Verbosity verbosity) {
CommonUtil.indent(sb, indent)
.append("ledger[")
.append(ledgerId)
.append("] allocator: ")
.append(allocator.getName())
.append("), isOwning: ")
.append(", size: ")
.append(", references: ")
.append(bufRefCnt.get())
.append(", life: ")
.append(lCreationTime)
.append("..")
.append(lDestructionTime)
.append(", allocatorManager: [")
.append(", life: ");
.append("ledger[")
.append(ledgerId)
.append("] allocator: ")
.append(allocator.getName())
.append("), isOwning: ")
.append(", size: ")
.append(", references: ")
.append(bufRefCnt.get())
.append(", life: ")
.append(lCreationTime)
.append("..")
.append(lDestructionTime)
.append(", allocatorManager: [")
.append(", life: ");

if (!BaseAllocator.DEBUG) {
sb.append("]\n");
} else {
Preconditions.checkArgument(buffers != null, "IdentityHashMap of buffers must not be null");
synchronized (buffers) {
sb.append("] holds ")
.append(buffers.size())
.append(" buffers. \n");
.append(buffers.size())
.append(" buffers. \n");
for (ArrowBuf buf : buffers.keySet()) {
buf.print(sb, indent + 2, verbosity);
sb.append('\n');
Expand Down
Loading

0 comments on commit e07b445

Please sign in to comment.