-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchanges.txt
More file actions
5884 lines (5476 loc) · 279 KB
/
Copy pathchanges.txt
File metadata and controls
5884 lines (5476 loc) · 279 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/Over.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/Over.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/Over.java (working copy)
@@ -461,8 +461,7 @@
// beginning of the bag.
if (nextRow < 0) return mTupleFactory.newTuple(1);
- // Check if the pointer has moved past the end of the window
- if (nextRow >= tuples.size()) {
+ // Check if the pointer has moved past the end of the window if (nextRow >= tuples.size()) {
return mTupleFactory.newTuple(1);
}
@@ -838,8 +837,7 @@
+ iter.begin + " end " + iter.end + " nextRow " +
iter.nextRow + " size " + iter.tuples.size());
System.out.print("{");
- while (iter.hasNext()) {
- Tuple t = iter.next();
+ while (iter.hasNext()) {Tuple t = iter.next();
if (t == null) System.out.print("null,");
else System.out.print(t.toString() + ",");
}
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/stats/COR.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/stats/COR.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/stats/COR.java (working copy)
@@ -106,8 +106,7 @@
temp.set(0, "var"+i);
temp.set(1, "var"+j);
}
-
- Tuple tempResult = computeAll((DataBag)input.get(i),(DataBag)input.get(j));
+ Tuple tempResult = computeAll((DataBag)input.get(i),(DataBag)input.get(j));
double size = ((DataBag)input.get(i)).size();
double sum_x_y = (Double)tempResult.get(0);
double sum_x = (Double)tempResult.get(1);
@@ -231,8 +230,7 @@
int totalSchemas=2;
while(totalSchemas*(totalSchemas-1)<combined.size()){
totalSchemas++;
- }
-
+ }
DataBag output = DefaultBagFactory.getInstance().newDefaultBag();
for(int i=0;i<totalSchemas;i++){
for(int j=i+1;j<totalSchemas;j++){
@@ -241,8 +239,7 @@
if(flag){
result.set(0, schemaName.elementAt(i));
result.set(1, schemaName.elementAt(j));
- }
- else{
+ } else{
result.set(0, "var"+i);
result.set(1, "var"+j);
}
@@ -258,8 +255,7 @@
}catch(Exception e){
System.err.println("Failed to process input record; error - " + e.getMessage());
return null;
- }
- output.add(result);
+ } output.add(result);
count+=2;
}
}
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/stats/COV.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/stats/COV.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/stats/COV.java (working copy)
@@ -108,8 +108,7 @@
temp.set(0, "var"+i);
temp.set(1, "var"+j);
}
-
- Tuple tempResult = computeAll((DataBag)input.get(i), (DataBag)input.get(j));
+ Tuple tempResult = computeAll((DataBag)input.get(i), (DataBag)input.get(j));
double size = ((DataBag)input.get(i)).size();
double sum_x_y = (Double)tempResult.get(0);
double sum_x = (Double)tempResult.get(1);
@@ -227,8 +226,7 @@
//number of schemas would be root of x*x - x - n =0
try{
- Tuple combined = combine((DataBag)input.get(0));
- int totalSchemas=2;
+ Tuple combined = combine((DataBag)input.get(0)); int totalSchemas=2;
while(totalSchemas*(totalSchemas-1)<combined.size()){
totalSchemas++;
}
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/LookupInFiles.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/LookupInFiles.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/LookupInFiles.java (working copy)
@@ -81,10 +81,8 @@
for (int i = 0; i < mFiles.size(); ++i) {
// Files contain only 1 column with the key. No Schema. All keys
// separated by new line.
-
- BufferedReader reader = null;
-
- InputStream is = null;
+ BufferedReader reader = null;
+ InputStream is = null;
try {
is = FileLocalizer.openDFSFile(mFiles.get(i), props);
} catch (IOException e) {
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/RegexExtractAll.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/RegexExtractAll.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/RegexExtractAll.java (working copy)
@@ -92,8 +92,7 @@
@Override
public Schema outputSchema(Schema input) {
try {
- return new Schema(new Schema.FieldSchema(getSchemaName(this.getClass().getName().toLowerCase(), input),
- DataType.TUPLE));
+ return new Schema(new Schema.FieldSchema(getSchemaName(this.getClass().getName().toLowerCase(), input), DataType.TUPLE));
} catch (Exception e) {
return null;
}
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/util/Top.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/util/Top.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/util/Top.java (working copy)
@@ -69,7 +69,7 @@
@Deprecated
public class Top extends EvalFunc<DataBag> implements Algebraic{
- private static final Log log = LogFactory.getLog(Top.class);
+ private static final Log LOG = LogFactory.getLog(Top.class);
static BagFactory mBagFactory = BagFactory.getInstance();
static TupleFactory mTupleFactory = TupleFactory.getInstance();
private Random randomizer = new Random();
@@ -102,8 +102,7 @@
}
return DataType.compare(field1, field2, datatype, datatype);
} catch (ExecException e) {
- throw new RuntimeException("Error while comparing o1:" + o1
- + " and o2:" + o2, e);
+ throw new RuntimeException("Error while comparing o1:" + o1+" and o2:" + o2, e);
}
}
}
@@ -124,12 +123,11 @@
for (Tuple t : store) {
outputBag.add(t);
}
- if (log.isDebugEnabled()) {
+ if (LOG.isDebugEnabled()) {
if (randomizer.nextInt(1000) == 1) {
- log.debug("outputting a bag: ");
- for (Tuple t : outputBag)
- log.debug("outputting "+t.toDelimitedString("\t"));
- log.debug("==================");
+ LOG.debug("outputting a bag: ");
+ for (Tuple t : outputBag) LOG.debug("outputting "+t.toDelimitedString("\t"));
+ LOG.debug("==================");
}
}
return outputBag;
@@ -202,7 +200,7 @@
* <Int, Int, DataBag> -- same schema as expected input.
*/
static public class Initial extends EvalFunc<Tuple> {
- //private static final Log log = LogFactory.getLog(Initial.class);
+ //private static final Log LOG = LogFactory.getLog(Initial.class);
//private final Random randomizer = new Random();
@Override
public Tuple exec(Tuple tuple) throws IOException {
@@ -222,8 +220,7 @@
}
retTuple.set(0, n);
retTuple.set(1,fieldNum);
- retTuple.set(2, outputBag);
- return retTuple;
+ retTuple.set(2, outputBag); return retTuple;
} catch (Exception e) {
throw new RuntimeException("General Exception executing function: " + e);
}
@@ -231,7 +228,7 @@
}
static public class Intermed extends EvalFunc<Tuple> {
- private static final Log log = LogFactory.getLog(Intermed.class);
+ private static final Log LOG = LogFactory.getLog(Intermed.class);
private final Random randomizer = new Random();
/* The input is a tuple that contains a single bag.
* This bag contains outputs of the Initial step --
@@ -278,9 +275,7 @@
retTuple.set(0, n);
retTuple.set(1,fieldNum);
retTuple.set(2, outputBag);
- if (log.isDebugEnabled()) {
- if (randomizer.nextInt(1000) == 1) log.debug("outputting "+retTuple.toDelimitedString("\t"));
- }
+ if (LOG.isDebugEnabled()) { if (randomizer.nextInt(1000) == 1) LOG.debug("outputting "+retTuple.toDelimitedString("\t"));}
return retTuple;
} catch (ExecException e) {
throw new RuntimeException("ExecException executing function: ", e);
@@ -293,7 +288,7 @@
static public class Final extends EvalFunc<DataBag> {
- private static final Log log = LogFactory.getLog(Final.class);
+ private static final Log LOG = LogFactory.getLog(Final.class);
private final Random randomizer = new Random();
@@ -340,8 +335,8 @@
for (Tuple t : store) {
outputBag.add(t);
}
- if (log.isDebugEnabled()) {
- if (randomizer.nextInt(1000) == 1) for (Tuple t : outputBag) log.debug("outputting "+t.toDelimitedString("\t"));
+ if (LOG.isDebugEnabled()) {
+ if (randomizer.nextInt(1000) == 1) for (Tuple t : outputBag) LOG.debug("outputting "+t.toDelimitedString("\t"));
}
return outputBag;
} catch (ExecException e) {
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/util/apachelogparser/DateExtractor.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/util/apachelogparser/DateExtractor.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/util/apachelogparser/DateExtractor.java (working copy)
@@ -31,7 +31,7 @@
/**
* DateExtractor has four different constructors which each allow for different functionality. The
* incomingDateFormat ("dd/MMM/yyyy:HH:mm:ss Z" by default) is used to match the date string that gets passed in from the
- * log. The outgoingDateFormat ("yyyy-MM-dd" by default) is used to format the returned string.
+ * LOG. The outgoingDateFormat ("yyyy-MM-dd" by default) is used to format the returned string.
*
* Different constructors exist for each combination; please use the appropriate respective constructor.
*
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/xml/XPath.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/xml/XPath.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/xml/XPath.java (working copy)
@@ -88,13 +88,11 @@
if(!cache || xpath == null || !xml.equals(this.xml))
{
final InputSource source = new InputSource(new StringReader(xml));
-
- this.xml = xml; //track the xml for subsequent calls to this udf
+ this.xml = xml; //track the xml for subsequent calls to this udf
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
final DocumentBuilder db = dbf.newDocumentBuilder();
-
- this.document = db.parse(source);
+ this.document = db.parse(source);
final XPathFactory xpathFactory = XPathFactory.newInstance();
@@ -109,8 +107,7 @@
return value;
} catch (Exception e) {
- warn("Error processing input " + input.getType(0),
- PigWarning.UDF_WARNING_1);
+ warn("Error processing input " + input.getType(0), PigWarning.UDF_WARNING_1);
return null;
}
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/AllLoader.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/AllLoader.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/AllLoader.java (working copy)
@@ -665,8 +665,7 @@
FuncSpec funcSpec = loadFuncHelper.determineFunction(fileName);
if (funcSpec == null) {
- throw new IOException("Cannot determine LoadFunc for "
- + fileName);
+ throw new IOException("Cannot determine LoadFunc for "+fileName);
}
selectedLoadFunc = (LoadFunc) PigContext
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/CSVExcelStorage.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/CSVExcelStorage.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/CSVExcelStorage.java (working copy)
@@ -319,8 +319,7 @@
// then the entire field must be enclosed in double quotes:
embeddedNewlineIndex = fieldStr.indexOf(LINEFEED);
- if ((fieldStr.indexOf(fieldDelimiter) != -1) ||
- (fieldStr.indexOf(DOUBLE_QUOTE) != -1) ||
+ if ((fieldStr.indexOf(fieldDelimiter) != -1) ||(fieldStr.indexOf(DOUBLE_QUOTE) != -1) ||
(multilineTreatment == Multiline.YES) && (embeddedNewlineIndex != -1)) {
fieldStr = "\"" + fieldStr + "\"";
}
@@ -376,8 +375,7 @@
} catch (InterruptedException e) {
int errCode = 6018;
String errMsg = "Error while reading input";
- throw new ExecException(errMsg, errCode,
- PigException.REMOTE_ENVIRONMENT, e);
+ throw new ExecException(errMsg, errCode, PigException.REMOTE_ENVIRONMENT, e);
}
}
loadingFirstRecord = false;
@@ -407,54 +405,42 @@
while (sawEmbeddedRecordDelimiter || getNextFieldID == 0) {
Text value = null;
if (sawEmbeddedRecordDelimiter) {
-
- // Deal with pulling more records from the input, because
+ // Deal with pulling more records from the input, because
// a double quoted embedded newline was encountered in a field.
- // Save the length of the record so far, plus one byte for the
- // record delimiter (usually newline) that's embedded in the field
- // we were working on before falling into this branch:
+ // Save the length of the record so far, plus one byte for the // record delimiter (usually newline) that's embedded in the field // we were working on before falling into this branch:
int prevLineLen = recordLen + 1;
-
- // Save previous line (the one with the field that has the newline) in a new array.
+ // Save previous line (the one with the field that has the newline) in a new array.
// The last byte will be random; we'll fill in the embedded
// record delimiter (usually newline) below:
byte[] prevLineSaved = Arrays.copyOf(buf, prevLineLen);
prevLineSaved[prevLineLen - 1] = RECORD_DEL;
-
- // Read the continuation of the record, unless EOF:
+ // Read the continuation of the record, unless EOF:
if (!in.nextKeyValue()) {
return null;
- }
- value = (Text) in.getCurrentValue();
+ } value = (Text) in.getCurrentValue();
recordLen = value.getLength();
// Grab the continuation's bytes:
buf = value.getBytes();
-
- // Combine the previous line and the continuation into a new array.
+ // Combine the previous line and the continuation into a new array.
// The following copyOf() does half the job: it allocates all the
// space, and also copies the previous line into that space:
byte[] prevLineAndContinuation = Arrays.copyOf(prevLineSaved, prevLineLen + recordLen);
-
- // Now append the continuation. Parms: fromBuf, fromStartPos, toBuf, toStartPos, lengthToCopy:
+ // Now append the continuation. Parms: fromBuf, fromStartPos, toBuf, toStartPos, lengthToCopy:
System.arraycopy(buf, 0, prevLineAndContinuation, prevLineLen, recordLen);
-
- // We'll work with the combination now:
+ // We'll work with the combination now:
buf = prevLineAndContinuation;
-
- // Do the whole record over from the start:
+ // Do the whole record over from the start:
mProtoTuple.clear();
getNextInQuotedField = false;
evenQuotesSeen = true;
getNextFieldID = 0;
recordLen = prevLineAndContinuation.length;
-
- } else {
+ } else {
// Previous record finished cleanly: start with the next record,
// unless EOF:
if (!in.nextKeyValue()) {
return null;
- }
- value = (Text) in.getCurrentValue();
+ } value = (Text) in.getCurrentValue();
// if the line is a duplicate header and 'SKIP_INPUT_HEADER' is set, ignore it
// (this might happen if multiple files each with a header are combined into a single split)
@@ -468,8 +454,7 @@
getNextFieldID = 0;
recordLen = value.getLength();
}
-
- nextTupleSkipChar = false;
+ nextTupleSkipChar = false;
ByteBuffer fieldBuffer = ByteBuffer.allocate(recordLen);
@@ -481,15 +466,13 @@
// The '!sawEmbeddedRecordDelimiter' handles the case of
// embedded newlines; we are amidst a field, not at
// the final record:
- if (!sawEmbeddedRecordDelimiter)
- readField(fieldBuffer, getNextFieldID++);
+ if (!sawEmbeddedRecordDelimiter) readField(fieldBuffer, getNextFieldID++);
} // end while
} catch (InterruptedException e) {
int errCode = 6018;
String errMsg = "Error while reading input";
- throw new ExecException(errMsg, errCode,
- PigException.REMOTE_ENVIRONMENT, e);
+ throw new ExecException(errMsg, errCode, PigException.REMOTE_ENVIRONMENT, e);
}
Tuple t = mTupleFactory.newTupleNoCopy(mProtoTuple);
@@ -574,8 +557,7 @@
fieldBuffer.put(b);
}
} else if (b == DOUBLE_QUOTE) {
- // Does a double quote immediately follow?
- if ((i < recordLen-1) && (buf[i+1] == DOUBLE_QUOTE)) {
+ // Does a double quote immediately follow? if ((i < recordLen-1) && (buf[i+1] == DOUBLE_QUOTE)) {
fieldBuffer.put(b);
nextTupleSkipChar = true;
continue;
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/CSVLoader.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/CSVLoader.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/CSVLoader.java (working copy)
@@ -146,8 +146,7 @@
} catch (InterruptedException e) {
int errCode = 6018;
String errMsg = "Error while reading input";
- throw new ExecException(errMsg, errCode,
- PigException.REMOTE_ENVIRONMENT, e);
+ throw new ExecException(errMsg, errCode, PigException.REMOTE_ENVIRONMENT, e);
}
Tuple t = mTupleFactory.newTupleNoCopy(mProtoTuple);
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/DBStorage.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/DBStorage.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/DBStorage.java (working copy)
@@ -38,7 +38,7 @@
import java.sql.*;
public class DBStorage extends StoreFunc {
- private final Log log = LogFactory.getLog(getClass());
+ private final Log LOG = LogFactory.getLog(getClass());
private PreparedStatement ps;
private Connection con;
@@ -60,12 +60,12 @@
public DBStorage(String driver, String jdbcURL, String user, String pass,
String insertQuery, String batchSize) throws RuntimeException {
- log.debug("DBStorage(" + driver + "," + jdbcURL + "," + user + ",XXXX,"
+ LOG.debug("DBStorage(" + driver + "," + jdbcURL + "," + user + ",XXXX,"
+ insertQuery + ")");
try {
Class.forName(driver);
} catch (ClassNotFoundException e) {
- log.error("can't load DB driver:" + driver, e);
+ LOG.error("can't load DB driver:" + driver, e);
throw new RuntimeException("Can't load DB Driver", e);
}
this.jdbcURL = jdbcURL;
@@ -219,7 +219,7 @@
ps = null;
con = null;
} catch (SQLException e) {
- log.error("ps.close", e);
+ LOG.error("ps.close", e);
throw new IOException("JDBC Error", e);
}
}
@@ -294,7 +294,7 @@
con.setAutoCommit(false);
ps = con.prepareStatement(insertQuery);
} catch (SQLException e) {
- log.error("Unable to connect to JDBC @" + jdbcURL);
+ LOG.error("Unable to connect to JDBC @" + jdbcURL);
throw new IOException("JDBC Error", e);
}
count = 0;
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/FixedWidthLoader.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/FixedWidthLoader.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/FixedWidthLoader.java (working copy)
@@ -112,7 +112,7 @@
private String udfContextSignature = null;
private static final String SCHEMA_SIGNATURE = "pig.fixedwidthloader.schema";
private static final String REQUIRED_FIELDS_SIGNATURE = "pig.fixedwidthloader.required_fields";
- private static final Log log = LogFactory.getLog(FixedWidthLoader.class);
+ private static final Log LOG = LogFactory.getLog(FixedWidthLoader.class);
/*
* Constructors and helper methods
@@ -154,8 +154,7 @@
byte fieldType = fields[i].getType();
if (fieldType == DataType.MAP || fieldType == DataType.TUPLE || fieldType == DataType.BAG) {
throw new IllegalArgumentException(
- "Field \"" + fields[i].getName() + "\" is an object type (map, tuple, or bag). " +
- "Object types are not supported by FixedWidthLoader."
+ "Field \"" + fields[i].getName() + "\" is an object type (map, tuple, or bag). " + "Object types are not supported by FixedWidthLoader."
);
}
}
@@ -188,8 +187,7 @@
String offsets[] = range.split("-", 2);
offsets[0] = offsets[0].trim();
offsets[1] = offsets[1].trim();
-
- if (offsets[0].equals(""))
+ if (offsets[0].equals(""))
start = 0;
else
start = Integer.parseInt(offsets[0]) - 1;
@@ -297,8 +295,7 @@
public Tuple getNext() throws IOException {
if (loadingFirstRecord && skipHeader && (splitIndex == 0 || splitIndex == -1)) {
try {
- if (!reader.nextKeyValue())
- return null;
+ if (!reader.nextKeyValue()) return null;
header = ((Text) reader.getCurrentValue()).toString();
} catch (Exception e) {
throw new IOException(e);
@@ -353,8 +350,7 @@
return t;
}
- private Object readField(String line, ResourceFieldSchema field, FixedWidthField column)
- throws IOException, IllegalArgumentException {
+ private Object readField(String line, ResourceFieldSchema field, FixedWidthField column) throws IOException, IllegalArgumentException {
int start = column.start;
int end = Math.min(column.end, line.length());
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/FixedWidthStorer.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/FixedWidthStorer.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/FixedWidthStorer.java (working copy)
@@ -86,7 +86,7 @@
private String udfContextSignature = null;
private static final String SCHEMA_SIGNATURE = "pig.fixedwidthloader.schema";
- private static final Log log = LogFactory.getLog(FixedWidthStorer.class);
+ private static final Log LOG = LogFactory.getLog(FixedWidthStorer.class);
/*
* Constructors and contructor helper methods
@@ -248,8 +248,7 @@
int numDigitsRightOfDecimal = width - numDigitsLeftOfDecimal - 1; // should be at least 1
String truncated = String.format("%." + numDigitsRightOfDecimal + "f", doubleVal);
- warn("Cannot fit " + fieldStr + " in field starting at column " +
- column.start + " and ending at column " + (column.end - 1) + ". " +
+ warn("Cannot fit " + fieldStr + " in field starting at column " + column.start + " and ending at column " + (column.end - 1) + ". " +
"Since the field is a decimal type, truncating it to " + truncated + " " +
"to fit in the column.",
PigWarning.UDF_WARNING_1);
@@ -256,8 +255,7 @@
sb.append(truncated);
} else {
// Field is float or double but cannot be rounded to fit
- warn("Cannot fit " + fieldStr + " in field starting at column " +
- column.start + " and ending at column " + (column.end - 1) + ". " +
+ warn("Cannot fit " + fieldStr + " in field starting at column " + column.start + " and ending at column " + (column.end - 1) + ". " +
"Writing null (all spaces) instead.",
PigWarning.UDF_WARNING_2);
for (int i = 0; i < width; i++) {
@@ -265,8 +263,7 @@
}
}
} else {
- warn("Cannot fit " + fieldStr + " in field starting at column " +
- column.start + " and ending at column " + (column.end - 1) + ". " +
+ warn("Cannot fit " + fieldStr + " in field starting at column " + column.start + " and ending at column " + (column.end - 1) + ". " +
"Writing null (all spaces) instead.",
PigWarning.UDF_WARNING_2);
for (int i = 0; i < width; i++) {
@@ -291,8 +288,7 @@
return null;
}
- public void storeStatistics(ResourceStatistics stats, String location, Job job)
- throws IOException {
+ public void storeStatistics(ResourceStatistics stats, String location, Job job) throws IOException {
// Not implemented
}
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/HadoopJobHistoryLoader.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/HadoopJobHistoryLoader.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/HadoopJobHistoryLoader.java (working copy)
@@ -177,39 +177,28 @@
@Override
public boolean nextKeyValue() throws IOException, InterruptedException {
if (location != null) {
- LOG.info("load: " + location);
- Path full = new Path(location);
- String[] jobDetails =
- JobInfo.decodeJobHistoryFileName(full.getName()).split("_");
- String jobId = jobDetails[2] + "_" + jobDetails[3] + "_"
- + jobDetails[4];
+ LOG.info("load: " + location); Path full = new Path(location); String[] jobDetails = JobInfo.decodeJobHistoryFileName(full.getName()).split("_");
+ String jobId = jobDetails[2] + "_" + jobDetails[3] + "_"+jobDetails[4];
JobHistory.JobInfo job = new JobHistory.JobInfo(jobId);
-
- value = new MRJobInfo();
-
- FileSystem fs = full.getFileSystem(conf);
+value = new MRJobInfo();
+ FileSystem fs = full.getFileSystem(conf);
FileStatus fstat = fs.getFileStatus(full);
-
- LOG.info("file size: " + fstat.getLen());
+ LOG.info("file size: " + fstat.getLen());
DefaultJobHistoryParser.parseJobTasks(location, job,
- full.getFileSystem(conf));
- LOG.info("job history parsed sucessfully");
+ full.getFileSystem(conf));LOG.info("job history parsed sucessfully");
HadoopJobHistoryLoader.parseJobHistory(conf, job, value);
LOG.info("get parsed job history");
-
- // parse Hadoop job xml file
+ // parse Hadoop job xml file
Path parent = full.getParent();
String jobXml = jobDetails[0] + "_" + jobDetails[1] + "_" + jobDetails[2] + "_conf.xml";
Path p = new Path(parent, jobXml);
-
- FSDataInputStream fileIn = fs.open(p);
+ FSDataInputStream fileIn = fs.open(p);
Map<String, String> val = HadoopJobHistoryLoader
.parseJobXML(fileIn);
for (String key : val.keySet()) {
value.job.put(key, val.get(key));
}
-
- location = null;
+ location = null;
return true;
}
value = null;
@@ -285,8 +274,7 @@
value.concat(",");
parseAndAddJobCounters(job, value);
break;
- default:
- LOG.debug("JobHistory.Keys."+ key + " : NOT INCLUDED IN LOADER RETURN VALUE");
+ default:LOG.debug("JobHistory.Keys."+ key + " : NOT INCLUDED IN LOADER RETURN VALUE");
break;
}
}
@@ -358,18 +346,15 @@
JobHistory.Keys key = mtc.getKey();
String val = mtc.getValue();
switch (key) {
- case START_TIME:
- startTime = Long.valueOf(val);
+ case START_TIME: startTime = Long.valueOf(val);
break;
case FINISH_TIME:
endTime = Long.valueOf(val);
- break;
- case COUNTERS: {
+ break; case COUNTERS: {
try {
Counters counters = Counters.fromEscapedCompactString(val);
long rows = counters.getGroup(TASK_COUNTER_GROUP)
- .getCounterForName(MAP_INPUT_RECORDS).getCounter();
- if (rows < minMapRows) minMapRows = rows;
+ .getCounterForName(MAP_INPUT_RECORDS).getCounter(); if (rows < minMapRows) minMapRows = rows;
if (rows > maxMapRows) maxMapRows = rows;
} catch (ParseException e) {
LOG.warn("Failed to parse job counters", e);
@@ -376,9 +361,7 @@
}
}
break;
- default:
- LOG.warn("JobHistory.Keys." + key
- + " : NOT INCLUDED IN PERFORMANCE ADVISOR MAP COUNTERS");
+ default: LOG.warn("JobHistory.Keys." + key + " : NOT INCLUDED IN PERFORMANCE ADVISOR MAP COUNTERS");
break;
}
}
@@ -407,8 +390,7 @@
JobHistory.Keys key = rtc.getKey();
String val = rtc.getValue();
switch (key) {
- case START_TIME:
- startTime = Long.valueOf(val);
+ case START_TIME: startTime = Long.valueOf(val);
break;
case FINISH_TIME:
endTime = Long.valueOf(val);
@@ -417,8 +399,7 @@
try {
Counters counters = Counters.fromEscapedCompactString(val);
long rows = counters.getGroup(TASK_COUNTER_GROUP)
- .getCounterForName(REDUCE_INPUT_RECORDS).getCounter();
- if (rows < minReduceRows) minReduceRows = rows;
+ .getCounterForName(REDUCE_INPUT_RECORDS).getCounter(); if (rows < minReduceRows) minReduceRows = rows;
if (rows > maxReduceRows) maxReduceRows = rows;
} catch (ParseException e) {
LOG.warn("Failed to parse job counters", e);
@@ -425,14 +406,11 @@
}
}
break;
- default:
- LOG.warn("JobHistory.Keys." + key
- + " : NOT INCLUDED IN PERFORMANCE ADVISOR REDUCE COUNTERS");
+ default: LOG.warn("JobHistory.Keys." + key + " : NOT INCLUDED IN PERFORMANCE ADVISOR REDUCE COUNTERS");
break;
}
}
-
- duration = endTime - startTime;
+ duration = endTime - startTime;
if (minReduceTime > duration) minReduceTime = duration;
if (maxReduceTime < duration) maxReduceTime = duration;
totalReduceTime += duration;
@@ -556,8 +534,7 @@
String qName) throws SAXException {
String tag = tags.pop();
if (tag == null || !tag.equalsIgnoreCase(qName)) {
- throw new SAXException("Malformatted XML file: " + tag + " : "
- + qName);
+ throw new SAXException("Malformatted XML file: " + tag + " : "+qName);
}
curTag = null;
}
@@ -565,8 +542,7 @@
public void characters(char[] ch, int start, int length)
throws SAXException {
if (tags.size() > 1) {
- String s = new String(ch, start, length);
- if (curTag.equalsIgnoreCase(NAME)) {
+ String s = new String(ch, start, length);if (curTag.equalsIgnoreCase(NAME)) {
key = s;
}
if (curTag.equalsIgnoreCase(VALUE)) {
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/MultiStorage.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/MultiStorage.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/MultiStorage.java (working copy)
@@ -247,8 +247,7 @@
CompressionCodec codec = null;
String extension = "";
if (isCompressed) {
- Class<? extends CompressionCodec> codecClass =
- getOutputCompressorClass(ctx, GzipCodec.class);
+ Class<? extends CompressionCodec> codecClass =getOutputCompressorClass(ctx, GzipCodec.class);
codec = (CompressionCodec) ReflectionUtils.newInstance(codecClass, ctx.getConfiguration());
extension = codec.getDefaultExtension();
}
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/RegExLoader.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/RegExLoader.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/RegExLoader.java (working copy)
@@ -38,7 +38,7 @@
* There is a single abstract method, getPattern which needs to return a Pattern. Each group will be returned
* as a different DataAtom.
*
- * Look to org.apache.pig.piggybank.storage.apachelog.CommonLogLoader for example usage.
+ * Look to org.apache.pig.piggybank.storage.apacheLOG.CommonLogLoader for example usage.
*/
public abstract class RegExLoader extends LoadFunc {
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/XMLLoader.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/XMLLoader.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/XMLLoader.java (working copy)
@@ -466,7 +466,7 @@
/**
* logger from pig
*/
- protected final Log mLog = LogFactory.getLog(getClass());
+ protected final Log LOG = LogFactory.getLog(getClass());
private XMLFileRecordReader reader = null;
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/allloader/LoadFuncHelper.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/allloader/LoadFuncHelper.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/allloader/LoadFuncHelper.java (working copy)
@@ -265,8 +265,7 @@
if (loadFuncDefinition == null) {
// if still null thrown an error
- throw new RuntimeException("Cannot find loader for " + path
- + " extension mapping " + extensionMapping);
+ throw new RuntimeException("Cannot find loader for " + path+" extension mapping " + extensionMapping);
}
funcSpec = new FuncSpec(loadFuncDefinition);
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/apachelog/CombinedLogLoader.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/apachelog/CombinedLogLoader.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/apachelog/CombinedLogLoader.java (working copy)
@@ -24,11 +24,11 @@
*
* The log filename ends up being access_log from a line like
*
- * CustomLog logs/combined_log combined
+ * CustoLOG LOGs/combined_log combined
*
* Example:
*
- * raw = LOAD 'combined_log' USING org.apache.pig.piggybank.storage.apachelog.CombinedLogLoader AS
+ * raw = LOAD 'combined_log' USING org.apache.pig.piggybank.storage.apacheLOG.CombinedLogLoader AS
* (remoteAddr, remoteLogname, user, time, method, uri, proto, status, bytes, referer, userAgent);
*
*/
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/apachelog/CommonLogLoader.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/apachelog/CommonLogLoader.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/apachelog/CommonLogLoader.java (working copy)
@@ -24,11 +24,11 @@
*
* The log filename ends up being access_log from a line like
*
- * CustomLog logs/access_log common
+ * CustoLOG LOGs/access_log common
*
* Example:
*
- * raw = LOAD 'access_log' USING org.apache.pig.piggybank.storage.apachelog.CommongLogLoader AS (remoteAddr,
+ * raw = LOAD 'access_log' USING org.apache.pig.piggybank.storage.apacheLOG.CommongLogLoader AS (remoteAddr,
* remoteLogname, user, time, method, uri, proto, bytes);
*
*/
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroSchema2Pig.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroSchema2Pig.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroSchema2Pig.java (working copy)
@@ -77,7 +77,7 @@
private static ResourceFieldSchema inconvert(Schema in, String fieldName, Set<Schema> visitedRecords)
throws IOException {
- AvroStorageLog.details("InConvert avro schema with field name " + fieldName);
+ AvroStorageLOG.details("InConvert avro schema with field name " + fieldName);
Schema.Type avroType = in.getType();
ResourceFieldSchema fieldSchema = new ResourceFieldSchema();
@@ -85,7 +85,7 @@
if (avroType.equals(Schema.Type.RECORD)) {
- AvroStorageLog.details("convert to a pig tuple");
+ AvroStorageLOG.details("convert to a pig tuple");
if (visitedRecords.contains(in)) {
fieldSchema.setType(DataType.BYTEARRAY);
@@ -107,7 +107,7 @@
} else if (avroType.equals(Schema.Type.ARRAY)) {
- AvroStorageLog.details("convert array to a pig bag");
+ AvroStorageLOG.details("convert array to a pig bag");
fieldSchema.setType(DataType.BAG);
Schema elemSchema = in.getElementType();
ResourceFieldSchema subFieldSchema = inconvert(elemSchema, ARRAY_FIELD, visitedRecords);
@@ -115,7 +115,7 @@
} else if (avroType.equals(Schema.Type.MAP)) {
- AvroStorageLog.details("convert map to a pig map");
+ AvroStorageLOG.details("convert map to a pig map");
fieldSchema.setType(DataType.MAP);
} else if (avroType.equals(Schema.Type.UNION)) {
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroSchemaManager.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroSchemaManager.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroSchemaManager.java (working copy)
@@ -73,13 +73,9 @@
if (isNamedSchema(schema)) {
String typeName = schema.getName();
if (typeName2Schema.containsKey(typeName))
- AvroStorageLog.warn("Duplicate schemas defined for type:"
- + typeName
- + ". will ignore the second one:"
- + schema);
+ AvroStorageLOG.warn("Duplicate schemas defined for type:"+typeName+". will ignore the second one:"+schema);
else {
- AvroStorageLog.details("add " + schema.getName() + "=" + schema
- + " to type2Schema");
+ AvroStorageLOG.details("add " + schema.getName() + "=" + schema+" to type2Schema");
typeName2Schema.put(schema.getName(), schema);
}
}
@@ -95,10 +91,10 @@
if (!ignoreNameMap) {
if (name2Schema.containsKey(name))
- AvroStorageLog.warn("Duplicate schemas defined for alias:" + name
+ AvroStorageLOG.warn("Duplicate schemas defined for alias:" + name
+ ". Will ignore the second one:"+ fieldSchema);
else {
- AvroStorageLog.details("add " + name + "=" + fieldSchema + " to name2Schema");
+ AvroStorageLOG.details("add " + name + "=" + fieldSchema + " to name2Schema");
name2Schema.put(name, fieldSchema);
}
}
Index: contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java
===================================================================
--- contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java (revision 1579421)
+++ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java (working copy)
@@ -111,7 +111,7 @@
public AvroStorage() {
outputAvroSchema = null;
nullable = true;
- AvroStorageLog.setDebugLevel(0);
+ AvroStorageLOG.setDebugLevel(0);
checkSchema = true;
}
@@ -334,7 +334,7 @@
@SuppressWarnings("rawtypes")
@Override
public InputFormat getInputFormat() throws IOException {
- AvroStorageLog.funcCall("getInputFormat");
+ AvroStorageLOG.funcCall("getInputFormat");
InputFormat result = null;
if(inputAvroSchema != null) {
result = new PigAvroInputFormat(
@@ -349,7 +349,7 @@
@Override
public void prepareToRead(RecordReader reader, PigSplit split)
throws IOException {
- AvroStorageLog.funcCall("prepareToRead");
+ AvroStorageLOG.funcCall("prepareToRead");
this.reader = (PigAvroRecordReader) reader;
}
@@ -376,7 +376,7 @@
public ResourceSchema getSchema(String location, Job job) throws IOException {
/* get avro schema */
- AvroStorageLog.funcCall("getSchema");
+ AvroStorageLOG.funcCall("getSchema");
if (inputAvroSchema == null) {
Configuration conf = job.getConfiguration();
// If within a script, you store to one location and read from same
@@ -390,11 +390,11 @@
}
}
if(inputAvroSchema != null) {
- AvroStorageLog.details( "avro input schema:" + inputAvroSchema);
+ AvroStorageLOG.details( "avro input schema:" + inputAvroSchema);
/* convert to pig schema */
ResourceSchema pigSchema = AvroSchema2Pig.convert(inputAvroSchema);
- AvroStorageLog.details("pig input schema:" + pigSchema);
+ AvroStorageLOG.details("pig input schema:" + pigSchema);
if (pigSchema.getFields().length == 1){
pigSchema = pigSchema.getFields()[0].getSchema();
}
@@ -516,7 +516,7 @@
/* set debug level */
if (inputs.containsKey("debug")) {
- AvroStorageLog.setDebugLevel((Integer) inputs.get("debug"));
+ AvroStorageLOG.setDebugLevel((Integer) inputs.get("debug"));
}
/* initialize schema manager, if any */
@@ -523,7 +523,7 @@
AvroSchemaManager schemaManager = null;
if (inputs.containsKey("data")) {
Path path = new Path((String) inputs.get("data"));
- AvroStorageLog.details("data path=" + path.toUri().toString());
+ AvroStorageLOG.details("data path=" + path.toUri().toString());
FileSystem fs = FileSystem.get(path.toUri(), new Configuration());
Schema schema = getAvroSchema(path, fs);
schemaManager = new AvroSchemaManager(schema);
@@ -530,7 +530,7 @@
}
else if (inputs.containsKey("schema_file")) {
Path path = new Path((String) inputs.get("schema_file"));
- AvroStorageLog.details("schemaFile path=" + path.toUri().toString());
+ AvroStorageLOG.details("schemaFile path=" + path.toUri().toString());
FileSystem fs = FileSystem.get(path.toUri(), new Configuration());
Schema schema = getSchemaFromFile(path, fs);
schemaManager = new AvroSchemaManager(schema);
@@ -547,7 +547,7 @@
} else if (name.equalsIgnoreCase("same")) {
/* use schema in the specified path as output schema */
Path path = new Path( ((String) value).trim());
- AvroStorageLog.details("data path=" + path.toUri().toString());
+ AvroStorageLOG.details("data path=" + path.toUri().toString());
FileSystem fs = FileSystem.get(path.toUri(), new Configuration());
outputAvroSchema = getAvroSchema(path, fs);
} else if (name.equalsIgnoreCase("nullable")) {
@@ -558,7 +558,7 @@
} else if (name.equalsIgnoreCase("schema_uri")) {
/* use the contents of the specified path as output schema */
Path path = new Path( ((String) value).trim());
- AvroStorageLog.details("schema_uri path=" + path.toUri().toString());
+ AvroStorageLOG.details("schema_uri path=" + path.toUri().toString());
FileSystem fs = FileSystem.get(path.toUri(), new Configuration());
outputAvroSchema = getSchemaFromFile(path, fs);
userSpecifiedAvroSchema = outputAvroSchema;
@@ -584,7 +584,7 @@
/* use pre-defined schema*/
field = AvroStorageUtils.createUDField(index, s);
- AvroStorageLog.details("Use pre-defined schema(" + alias + "): " + s + " for field " + index);
+ AvroStorageLOG.details("Use pre-defined schema(" + alias + "): " + s + " for field " + index);
} else {
Schema schema = null;
try {
@@ -615,8 +615,7 @@
* and nullable will be ignored.*/
if (outputAvroSchema != null) {