Skip to content

Commit

Permalink
Released v2.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Oct 30, 2015
2 parents 5cfb188 + 012351c commit ca7ecfc
Show file tree
Hide file tree
Showing 291 changed files with 129,957 additions and 3,875 deletions.
26 changes: 13 additions & 13 deletions _base/script/release_community.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ fi

echo "Releasing OrientDB $1..."

DIR=distribution/target/orientdb-community-$1-distribution.dir/orientdb-community-$1/
#DIR=distribution/target/orientdb-community-$1-distribution.dir/orientdb-community-$1/

cp ../drivers/orientdb-jdbc/target/orientdb-jdbc-$1.jar $DIR/lib/
#cp ../drivers/orientdb-jdbc/target/orientdb-jdbc-$1.jar $DIR/lib/

cp ../modules/orientdb-lucene/target/orientdb-lucene-$1-dist.jar $DIR/plugins/
#cp ../modules/orientdb-lucene/target/orientdb-lucene-$1-dist.jar $DIR/plugins/

cp ../modules/orientdb-etl/target/orientdb-etl-$1.jar $DIR/lib/
cp ../modules/orientdb-etl/script/oetl.* $DIR/bin/
#cp ../modules/orientdb-etl/target/orientdb-etl-$1.jar $DIR/lib/
#cp ../modules/orientdb-etl/script/oetl.* $DIR/bin/

cd distribution/target/
#cd distribution/target/

rm orientdb-community-$1.tar.gz
rm orientdb-community-$1.zip
#rm orientdb-community-$1.tar.gz
#rm orientdb-community-$1.zip

cd orientdb-community-$1-distribution.dir
rm `find . -name ".DS_Store" -print`
rm `find . -name "*.wal" -print`
#cd orientdb-community-$1-distribution.dir
#rm `find . -name ".DS_Store" -print`
#rm `find . -name "*.wal" -print`

tar cvzf ../orientdb-community-$1.tar.gz orientdb-community-$1
zip -X -r -9 ../orientdb-community-$1.zip orientdb-community-$1
#tar cvzf ../orientdb-community-$1.tar.gz orientdb-community-$1
#zip -X -r -9 ../orientdb-community-$1.zip orientdb-community-$1
8 changes: 4 additions & 4 deletions _base/script/release_enterprise.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ cp -R distribution/target/orientdb-community-$1-distribution.dir/orientdb-commun

DIR=distribution/target/orientdb-community-$1-distribution.dir/orientdb-enterprise-$1/

cp ../drivers/orientdb-jdbc/target/orientdb-jdbc-$1.jar $DIR/lib/
#cp ../drivers/orientdb-jdbc/target/orientdb-jdbc-$1.jar $DIR/lib/

cp ../modules/orientdb-lucene/target/orientdb-lucene-$1-dist.jar $DIR/plugins/
#cp ../modules/orientdb-lucene/target/orientdb-lucene-$1-dist.jar $DIR/plugins/

cp ../modules/orientdb-etl/target/orientdb-etl-$1.jar $DIR/lib/
cp ../modules/orientdb-etl/script/oetl.* $DIR/bin/
#cp ../modules/orientdb-etl/target/orientdb-etl-$1.jar $DIR/lib/
#cp ../modules/orientdb-etl/script/oetl.* $DIR/bin/

cp ../../orientdb-enterprise/agent/target/agent-$1.zip $DIR/plugins/

Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<property environment="env"/>
<property name="vendor" value="Orient Technologies Ltd"/>
<property name="product" value="OrientDB"/>
<property name="version" value="2.1.3"/>
<property name="version" value="2.1.5-SNAPSHOT"/>
<condition property="community.release" value="${releaseHome}/orientdb-community-${version}"
else="../releases/orientdb-community-${version}">
<isset property="releaseHome"/>
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-parent</artifactId>
<version>2.1.3</version>
<version>2.1.5-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public OChannelBinaryAsynchClient createNewResource(final String iKey, final Obj

@Override
public boolean reuseResource(final String iKey, final Object[] iAdditionalArgs, final OChannelBinaryAsynchClient iValue) {
return true;
return iValue.isConnected();
}

});
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-parent</artifactId>
<version>2.1.3</version>
<version>2.1.5-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down
51 changes: 47 additions & 4 deletions core/src/main/grammar/OrientSQL.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,42 @@ public class OrientSql {

PARSER_END(OrientSql)


SKIP :
{
" "
| "\t"
| "\n"
| "\r"
| "\f"
}

/* COMMENTS */

MORE :
{
<"/**" ~["/"]> { input_stream.backup(1); } : IN_FORMAL_COMMENT
|
"/*" : IN_MULTI_LINE_COMMENT
}

<IN_FORMAL_COMMENT>
SPECIAL_TOKEN :
{
<FORMAL_COMMENT: "*/" > : DEFAULT
}

<IN_MULTI_LINE_COMMENT>
SPECIAL_TOKEN :
{
<MULTI_LINE_COMMENT: "*/" > : DEFAULT
}

<IN_FORMAL_COMMENT,IN_MULTI_LINE_COMMENT>
MORE :
{
< ~[] >
}

/* reserved words */
TOKEN:
Expand Down Expand Up @@ -1503,10 +1531,17 @@ OArrayRangeSelector ArrayRangeSelector():


String Alias():
{ OIdentifier identifier; }
{
identifier = Identifier()
{return identifier.getValue();}
OIdentifier identifier = null;
ORecordAttribute recordAttribute = null;
}
{
(
identifier = Identifier()
|
recordAttribute = RecordAttribute()
)
{return identifier!=null?identifier.getValue():recordAttribute.name;}
}

ORecordAttribute RecordAttribute():
Expand Down Expand Up @@ -2217,7 +2252,13 @@ OBooleanExpression InstanceofCondition():
}
{
(
jjtThis.left = Expression() <INSTANCEOF> ( jjtThis.right = Identifier() | token = <STRING_LITERAL> { jjtThis.rightString = token.image; } )
jjtThis.left = Expression() <INSTANCEOF> (
jjtThis.right = Identifier()
|
token = <STRING_LITERAL> { jjtThis.rightString = token.image; }
|
token = <CHARACTER_LITERAL> { jjtThis.rightString = token.image; }
)
)
{return jjtThis;}
}
Expand Down Expand Up @@ -2403,6 +2444,8 @@ OBooleanExpression MatchesCondition():
( token = <STRING_LITERAL> {jjtThis.right = token.image;} )
|
( token = <CHARACTER_LITERAL> {jjtThis.right = token.image;} )
|
( jjtThis.rightParam = InputParameter() )
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ else if (level.equals(Level.INFO)) {

Logger log = Logger.getLogger(DEFAULT_LOG);
while (log != null) {
log.setLevel(level);

for (Handler h : log.getHandlers()) {
if (h.getClass().isAssignableFrom(iHandler)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* Value
* @see OTriple
*/
public class OPair<K extends Comparable<K>, V> implements Entry<K, V>, Comparable<OPair<K, V>>, Serializable {
public class OPair<K extends Comparable, V> implements Entry<K, V>, Comparable<OPair<K, V>>, Serializable {
public K key;
public V value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package com.orientechnologies.orient.core;

public class OConstants {
public static final String ORIENT_VERSION = "2.1.3";
public static final String ORIENT_VERSION = "2.1.5-SNAPSHOT";

public static final String ORIENT_URL = "www.orientdb.com";
public static final String COPYRIGHT = "Copyrights (c) 2015 Orient Technologies LTD";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
*/
package com.orientechnologies.orient.core.command;

import com.orientechnologies.common.listener.OProgressListener;

import java.util.Map;
import java.util.Set;

import com.orientechnologies.common.listener.OProgressListener;

/**
* Generic GOF command pattern implementation.
*
Expand Down Expand Up @@ -90,4 +90,6 @@ public interface OCommandExecutor {
int getSecurityOperationType();

boolean involveSchema();

Object mergeResults(Map<String, Object> results) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,22 @@
*/
package com.orientechnologies.orient.core.command;

import com.orientechnologies.common.collection.OMultiValue;
import com.orientechnologies.common.listener.OProgressListener;
import com.orientechnologies.common.parser.OBaseParser;
import com.orientechnologies.orient.core.config.OGlobalConfiguration;
import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal;
import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal;
import com.orientechnologies.orient.core.db.OExecutionThreadLocal;
import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.exception.OCommandExecutionException;
import com.orientechnologies.orient.core.metadata.security.ORole;
import com.orientechnologies.orient.core.metadata.security.ORule;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -148,4 +153,45 @@ protected String upperCase(String text) {
public OCommandDistributedReplicateRequest.DISTRIBUTED_RESULT_MGMT getDistributedResultManagement() {
return OCommandDistributedReplicateRequest.DISTRIBUTED_RESULT_MGMT.CHECK_FOR_EQUALS;
}

@Override
public Object mergeResults(final Map<String, Object> results) throws Exception {

if (results.isEmpty())
return null;

Object aggregatedResult = null;

for (Map.Entry<String, Object> entry : results.entrySet()) {
final String nodeName = entry.getKey();
final Object nodeResult = entry.getValue();

if (nodeResult instanceof Collection) {
if (aggregatedResult == null)
aggregatedResult = new ArrayList();

((List) aggregatedResult).addAll((Collection<?>) nodeResult);

} else if (nodeResult instanceof Exception)

// RECEIVED EXCEPTION
throw (Exception) nodeResult;

else if (nodeResult instanceof OIdentifiable) {
if (aggregatedResult == null)
aggregatedResult = new ArrayList();

((List) aggregatedResult).add(nodeResult);

} else if (nodeResult instanceof Number) {
if (aggregatedResult == null)
aggregatedResult = nodeResult;
else
OMultiValue.add(aggregatedResult, nodeResult);
}
}

return aggregatedResult;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,28 @@
*/
package com.orientechnologies.orient.core.command;

import java.util.Map;

import com.orientechnologies.common.listener.OProgressListener;
import com.orientechnologies.orient.core.serialization.OSerializableStream;

import java.util.Map;

/**
* Internal specialization of generic OCommand interface.
*
* @author Luca Garulli
*
* @param <T>
*/
public interface OCommandRequestInternal extends OCommandRequest, OSerializableStream {

public Map<Object, Object> getParameters();
Map<Object, Object> getParameters();

public OCommandResultListener getResultListener();
OCommandResultListener getResultListener();

public void setResultListener(OCommandResultListener iListener);
void setResultListener(OCommandResultListener iListener);

public OProgressListener getProgressListener();
OProgressListener getProgressListener();

public OCommandRequestInternal setProgressListener(OProgressListener iProgressListener);
OCommandRequestInternal setProgressListener(OProgressListener iProgressListener);

public void reset();
void reset();
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
*/
package com.orientechnologies.orient.core.command;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal;
import com.orientechnologies.orient.core.exception.OSerializationException;
import com.orientechnologies.orient.core.index.OCompositeKey;
Expand All @@ -34,6 +29,11 @@
import com.orientechnologies.orient.core.serialization.serializer.binary.impl.index.OCompositeKeySerializer;
import com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

/**
* Text based Command Request abstract class.
*
Expand Down Expand Up @@ -72,7 +72,7 @@ public OCommandRequestText setText(final String iText) {
return this;
}

public OSerializableStream fromStream(byte[] iStream) throws OSerializationException {
public OSerializableStream fromStream(final byte[] iStream) throws OSerializationException {
final OMemoryStream buffer = new OMemoryStream(iStream);
fromStream(buffer);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ public OCommandScript setLanguage(String language) {
public OSerializableStream fromStream(byte[] iStream) throws OSerializationException {
final OMemoryStream buffer = new OMemoryStream(iStream);
language = buffer.getAsString();
executionMode = OCommandDistributedReplicateRequest.DISTRIBUTED_EXECUTION_MODE.valueOf(buffer.getAsString());

// FIX TO HANDLE USAGE OF EXECUTION MODE STARTING FROM v2.1.3
final int currPosition = buffer.getPosition();
final String value = buffer.getAsString();
try {
executionMode = OCommandDistributedReplicateRequest.DISTRIBUTED_EXECUTION_MODE.valueOf(value);
} catch (IllegalArgumentException e) {
// OLD VERSION: RESET TO THE OLD POSITION
buffer.setPosition(currPosition);
}

fromStream(buffer);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public void change(final Object iCurrentValue, final Object iNewValue) {
}),

// COMMAND
COMMAND_TIMEOUT("command.timeout", "Default timeout for commands expressed in milliseconds", Long.class, 0),
COMMAND_TIMEOUT("command.timeout", "Default timeout for commands expressed in milliseconds", Long.class, 0,true),

// QUERY
QUERY_SCAN_THRESHOLD_TIP("query.scanThresholdTip",
Expand Down

0 comments on commit ca7ecfc

Please sign in to comment.