2828
2929public class ObDirectLoadProtocolV0 implements ObDirectLoadProtocol {
3030
31- public static final long OB_VERSION_4_2_5_3 = ObGlobal .calcVersion (4 , (short ) 2 ,
32- (byte ) 5 , (byte ) 3 );
33- public static final long OB_VERSION_4_3_0_0 = ObGlobal .calcVersion (4 , (short ) 3 ,
34- (byte ) 0 , (byte ) 0 );
35-
36- public static final long OB_VERSION_4_3_2_0 = ObGlobal .calcVersion (4 , (short ) 3 ,
37- (byte ) 2 , (byte ) 0 );
38- public static final long OB_VERSION_4_3_5_0 = ObGlobal .calcVersion (4 , (short ) 3 ,
39- (byte ) 5 , (byte ) 0 );
40-
41- private static final int PROTOCOL_VERSION = 0 ;
31+ private static final int PROTOCOL_VERSION = 0 ;
4232 private final ObDirectLoadLogger logger ;
4333 private final long obVersion ;
4434
@@ -58,26 +48,27 @@ public int getProtocolVersion() {
5848
5949 @ Override
6050 public void checkIsSupported (ObDirectLoadStatement statement ) throws ObDirectLoadException {
61- if (obVersion < OB_VERSION_4_3_2_0 ) {
51+ if (obVersion < ObGlobal . OB_VERSION_4_3_2_0 ) {
6252 // 432以下不支持inc|inc_replace
6353 String loadMethod = statement .getLoadMethod ();
6454 if (!loadMethod .isEmpty () && !loadMethod .equalsIgnoreCase ("full" )) {
6555 logger .warn ("load method in ob version " + ObGlobal .getObVsnString (obVersion )
6656 + "is not supported, minimum version required is "
67- + ObGlobal .getObVsnString (OB_VERSION_4_3_2_0 ));
57+ + ObGlobal .getObVsnString (ObGlobal . OB_VERSION_4_3_2_0 ));
6858 throw new ObDirectLoadNotSupportedException (
6959 "load method in ob version " + ObGlobal .getObVsnString (obVersion )
7060 + " is not supported, minimum version required is "
71- + ObGlobal .getObVsnString (OB_VERSION_4_3_2_0 ));
61+ + ObGlobal .getObVsnString (ObGlobal . OB_VERSION_4_3_2_0 ));
7262 }
73- } else if (obVersion < OB_VERSION_4_3_5_0 && statement .getPartitionNames ().length > 0 ) {
63+ } else if (obVersion < ObGlobal .OB_VERSION_4_3_5_0
64+ && statement .getPartitionNames ().length > 0 ) {
7465 logger .warn ("partition names in ob version " + ObGlobal .getObVsnString (obVersion )
7566 + "is not supported, minimum version required is "
76- + ObGlobal .getObVsnString (OB_VERSION_4_3_5_0 ));
67+ + ObGlobal .getObVsnString (ObGlobal . OB_VERSION_4_3_5_0 ));
7768 throw new ObDirectLoadNotSupportedException (
7869 "partition names in ob version " + ObGlobal .getObVsnString (obVersion )
7970 + " is not supported, minimum version required is "
80- + ObGlobal .getObVsnString (OB_VERSION_4_3_5_0 ));
71+ + ObGlobal .getObVsnString (ObGlobal . OB_VERSION_4_3_5_0 ));
8172 }
8273 }
8374
@@ -114,15 +105,25 @@ public ObDirectLoadHeartBeatRpc getHeartBeatRpc(ObDirectLoadTraceId traceId) {
114105 @ Override
115106 public ObDirectLoadDetachRpc getDetachRpc (ObDirectLoadTraceId traceId )
116107 throws ObDirectLoadException {
117- if (obVersion < OB_VERSION_4_3_0_0 ) {
118- if (obVersion < OB_VERSION_4_2_5_3 ) {
108+ if (obVersion < ObGlobal .OB_VERSION_4_3_0_0 ) {
109+ if (obVersion < ObGlobal .OB_VERSION_4_2_5_3 ) {
110+ logger .warn ("detach in ob version " + ObGlobal .getObVsnString (obVersion )
111+ + "is not supported, minimum version required is "
112+ + ObGlobal .getObVsnString (ObGlobal .OB_VERSION_4_2_5_3 ));
113+ throw new ObDirectLoadNotSupportedException (
114+ "detach in ob version " + ObGlobal .getObVsnString (obVersion )
115+ + " is not supported, minimum version required is "
116+ + ObGlobal .getObVsnString (ObGlobal .OB_VERSION_4_2_5_3 ));
117+ }
118+ } else if (obVersion < ObGlobal .OB_VERSION_4_5_0_0 ) {
119+ if (obVersion < ObGlobal .OB_VERSION_4_4_2_0 ) {
119120 logger .warn ("detach in ob version " + ObGlobal .getObVsnString (obVersion )
120121 + "is not supported, minimum version required is "
121- + ObGlobal .getObVsnString (OB_VERSION_4_2_5_3 ));
122+ + ObGlobal .getObVsnString (ObGlobal . OB_VERSION_4_4_2_0 ));
122123 throw new ObDirectLoadNotSupportedException (
123124 "detach in ob version " + ObGlobal .getObVsnString (obVersion )
124125 + " is not supported, minimum version required is "
125- + ObGlobal .getObVsnString (OB_VERSION_4_2_5_3 ));
126+ + ObGlobal .getObVsnString (ObGlobal . OB_VERSION_4_4_2_0 ));
126127 }
127128 } else {
128129 logger .warn ("detach in ob version " + ObGlobal .getObVsnString (obVersion )
0 commit comments