Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions eagle-core/eagle-query/eagle-service-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,21 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.eagle</groupId>
<artifactId>eagle-storage-jdbc</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.eagle</groupId>
<artifactId>eagle-embed-hbase</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public class JdbcConstants {
public static final String ROW_KEY_COLUMN_NAME = "uuid";

public static final int DEFAULT_TYPE_FOR_COMPLEX_TYPE = Types.BLOB;
public static final int DEFAULT_VARCHAR_SIZE = 30000;

//MySQL Max Row Size: 21485
public static final int DEFAULT_FIELD_VARCHAR_SIZE =1000;
public static final int DEFAULT_TAG_VARCHAR_SIZE =254;

// Eagle JDBC Storage Configuration
public static final String EAGLE_DB_USERNAME = "storage.jdbc.username";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static void registerJdbcType(Class<?> fieldType, Integer jdbcType){
// Initially bind basic java types with SQL types
//================================================
static {
registerJdbcType(String.class, Types.LONGVARCHAR);
registerJdbcType(String.class, Types.VARCHAR);
registerJdbcType(Integer.class, Types.INTEGER);
registerJdbcType(Double.class, Types.DOUBLE);
registerJdbcType(Float.class, Types.FLOAT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private Column createTagColumn(String tagName){
tagColumn.setTypeCode(Types.VARCHAR);
tagColumn.setJavaName(tagName);
// tagColumn.setScale(1024);
tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_VARCHAR_SIZE));
tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_FIELD_VARCHAR_SIZE));
tagColumn.setDefaultValue(null);
tagColumn.setDescription("eagle entity tag column for "+tagName);
return tagColumn;
Expand Down Expand Up @@ -197,7 +197,7 @@ private void buildTable(JdbcEntityDefinition entityDefinition, Table table){
// Index index = new UniqueIndex();
for (String tag : entityDefinition.getInternal().getTags()) {
Column tagColumn = createTagColumn(tag);
tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_VARCHAR_SIZE));
tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_TAG_VARCHAR_SIZE));
table.addColumn(tagColumn);
// IndexColumn indexColumn = new IndexColumn();
// indexColumn.setName(tag);
Expand All @@ -215,7 +215,7 @@ private void buildTable(JdbcEntityDefinition entityDefinition, Table table){
fieldColumn.setJavaName(entry.getKey());
Integer typeCode = entityDefinition.getJdbcColumnTypeCodeOrNull(entry.getKey());
typeCode = typeCode == null? Types.VARCHAR:typeCode;
if(typeCode == Types.VARCHAR) fieldColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_VARCHAR_SIZE));
if(typeCode == Types.VARCHAR) fieldColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_FIELD_VARCHAR_SIZE));
fieldColumn.setTypeCode(typeCode);
fieldColumn.setDescription("eagle field column "+entry.getKey()+":"+entityDefinition.getColumnTypeOrNull(entry.getKey()));
table.addColumn(fieldColumn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ServerDebug {
private static String serverConf = null;

static {
// Set application.conf
// Set application.conf
if (ServerDebug.class.getResourceAsStream("/application-debug.conf") != null
|| ServerDebug.class.getResourceAsStream("application-debug.conf") != null) {
LOGGER.info("config.resource = application-debug.conf");
Expand Down