1- /*
1+ /*
22 * Licensed to the Apache Software Foundation (ASF) under one
33 * or more contributor license agreements. See the NOTICE file
44 * distributed with this work for additional information
55 * regarding copyright ownership. The ASF licenses this file
66 * to you under the Apache License, Version 2.0 (the
77 * "License"); you may not use this file except in compliance
88 * with the License. You may obtain a copy of the License at
9- *
9+ *
1010 * http://www.apache.org/licenses/LICENSE-2.0
11- *
11+ *
1212 * Unless required by applicable law or agreed to in writing,
1313 * software distributed under the License is distributed on an
1414 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1818 */
1919package org .apache .parquet .hadoop .example ;
2020
21- import java .util .Set ;
2221import org .apache .hadoop .conf .Configuration ;
23- import org .apache .parquet .hadoop .api .InitContext ;
2422import org .junit .Test ;
2523import org .apache .parquet .hadoop .api .ReadSupport ;
2624import org .apache .parquet .schema .MessageType ;
@@ -45,23 +43,23 @@ public class GroupReadSupportTest {
4543 public void testInitWithoutSpecifyingRequestSchema () throws Exception {
4644 GroupReadSupport s = new GroupReadSupport ();
4745 Configuration configuration = new Configuration ();
48- Map <String , Set < String >> keyValueMetaData = new HashMap <>();
46+ Map <String , String > keyValueMetaData = new HashMap <String , String >();
4947 MessageType fileSchema = MessageTypeParser .parseMessageType (fullSchemaStr );
5048
51- ReadSupport .ReadContext context = s .init (new InitContext ( configuration , keyValueMetaData , fileSchema ) );
49+ ReadSupport .ReadContext context = s .init (configuration , keyValueMetaData , fileSchema );
5250 assertEquals (context .getRequestedSchema (), fileSchema );
5351 }
5452
5553 @ Test
5654 public void testInitWithPartialSchema () {
5755 GroupReadSupport s = new GroupReadSupport ();
5856 Configuration configuration = new Configuration ();
59- Map <String , Set < String >> keyValueMetaData = new HashMap <>();
57+ Map <String , String > keyValueMetaData = new HashMap <String , String >();
6058 MessageType fileSchema = MessageTypeParser .parseMessageType (fullSchemaStr );
6159 MessageType partialSchema = MessageTypeParser .parseMessageType (partialSchemaStr );
6260 configuration .set (ReadSupport .PARQUET_READ_SCHEMA , partialSchemaStr );
6361
64- ReadSupport .ReadContext context = s .init (new InitContext ( configuration , keyValueMetaData , fileSchema ) );
62+ ReadSupport .ReadContext context = s .init (configuration , keyValueMetaData , fileSchema );
6563 assertEquals (context .getRequestedSchema (), partialSchema );
6664 }
6765}
0 commit comments